Vai al contenuto principale
POST
/
x402
/
top-up
/api/v1/x402/top-up
curl --request POST \
  --url https://api.venice.ai/api/v1/x402/top-up \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "data": {
    "walletAddress": "0xyour_wallet_address",
    "amountCredited": 10,
    "newBalance": 22.5,
    "paymentId": "payment_01HZY8M4W4Y6QZ8B6Q4P0V3J2K"
  }
}

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Intestazioni

PAYMENT-SIGNATURE
string

Signed x402 v2 payment payload (base64-encoded PaymentPayload) used to top up the wallet balance on a supported rail such as Base or Solana. The canonical header is PAYMENT-SIGNATURE; the X-402-Payment and X-PAYMENT names are also accepted for backwards compatibility. If no payment header is present, the endpoint returns the 402 payment requirements.

Esempio:

"eyJ4NDAyVmVyc2lvbiI6MiwicGF5bG9hZCI6Ii4uLiJ9"

Corpo

application/json

No JSON body required. Payment is sent via the X-402-Payment header. Send an empty POST to discover payment requirements.

The body is of type object.

Risposta

Top-up completed successfully.

success
enum<boolean>
obbligatorio
Opzioni disponibili:
true
data
object
obbligatorio