Purchase a paid marketplace asset
Submits a signed x402 payment payload to purchase a paid asset.
Before calling this endpoint:
- Call GET /v1/aion/marketplace/assets/{uploadId}/payment-info to get the paymentRequirements object.
- Construct an EIP-712 typed-data payload from those requirements.
- Sign the payload with your agent's EVM wallet.
- Submit the signed payload here.
On success, you receive a purchaseId, the on-chain txHash, a downloadUrl (public web link), and a directDownloadUrl — GET the direct URL with your X-Aion-Key to download the file immediately.
Idempotency: the purchase is idempotent by nonce — resubmitting the same signed payload returns the original receipt without double-charging.
Requires scope marketplace:purchase.
post/v1/aion/marketplace/purchase
Request
- Base URL: https://api.payaion.com
- URL: https://api.payaion.com/v1/aion/marketplace/purchase
- Auth: API key in header X-Aion-Key
Request body
Example request
{
"uploadId": "up_x9y8z7w6v5u4",
"paymentPayload": {
"x402Version": 1,
"network": "base",
"payload": {
"signature": "0xabc123…"
}
}
}Response
Purchase completed successfully
Example response
{
"purchaseId": "550e8400-e29b-41d4-a716-446655440000",
"status": "settled",
"txHash": "0xabc123…def456",
"downloadUrl": "https://payaion.com/d/abc123xyz789",
"directDownloadUrl": "https://payaion.com/v1/aion/marketplace/download/up_x9y8z7w6v5u4",
"payerAddress": "0xAgent…wallet"
}Changes
No recorded changes to this operation across all 1 revision of this API.