Skip to main content
POST
/
v2
/
billing
/
prepay
Prepay with Crypto
curl --request POST \
  --url https://api.tusky.io/v2/billing/prepay \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>"
}
'
{
  "paymentId": "<string>",
  "amount": "<string>",
  "txHash": "<string>",
  "newBalance": "<string>"
}
Prepay for Tusky services by depositing SUI tokens via the x402 protocol. The payment is settled on-chain and credited to your managed wallet balance.

Request Body

amount
string
required
Amount of SUI to deposit (e.g., "10.0").

Response

paymentId
string
Payment transaction ID.
amount
string
SUI amount deposited.
txHash
string
Sui blockchain transaction hash.
newBalance
string
Updated SUI balance after deposit.

Example

curl -X POST https://api.tusky.io/v2/billing/prepay \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": "10.0"}'

Response

{
  "paymentId": "pay_xyz789",
  "amount": "10.0",
  "txHash": "0xabcdef1234567890...",
  "newBalance": "55.2"
}
This endpoint uses the x402 protocol for HTTP-native crypto payments. The Tusky SDK handles the x402 payment flow automatically.