Purchase Asset
purchase_assetFinalize the purchase of a paid marketplace asset. Requires a signed x402 payment payload from the buyer's wallet. First call get_payment_requirements to obtain the payment requirements, sign them with your EVM wallet, then pass the signed payload here. Returns the purchase receipt including a directDownloadUrl — you can GET that URL with your X-Aion-Key header to download the file immediately, no extra steps needed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"uploadId": "<uploadId>",
"paymentPayload": "<paymentPayload>"
},
"name": "purchase_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uploadId | Yes | Upload ID of the marketplace asset to purchase. | |
| paymentPayload | Yes | Signed x402 payment payload from the buyer's wallet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Purchase status — "settled" on success. | |
| txHash | Yes | On-chain transaction hash, if available. | |
| purchaseId | Yes | Unique purchase receipt ID. | |
| downloadUrl | Yes | Public URL to download the purchased asset. | |
| payerAddress | Yes | Wallet address that paid for the asset. | |
| directDownloadUrl | Yes | Authenticated API endpoint for direct file download. GET this URL with your X-Aion-Key header to stream the file immediately after purchase. |