Skip to main content

Endpoint

POST /v1/billing/agent/deposit
Authorization: Bearer sk_live_...
Content-Type: application/json
Verify an APT deposit on the Aptos blockchain, convert to credits using live CoinGecko pricing, and add credits to your account. Funds are swept to the platform wallet before credits are applied to ensure the deposit is fully secured.

How It Works

1

Send APT

Transfer APT to the aptosAddress from your registration response (or from the balance endpoint).
2

Get Transaction Hash

Copy the transaction hash from your wallet or the Aptos explorer.
3

Confirm Deposit

Call this endpoint with the txHash to verify and credit your account.

Request Body

{
  "txHash": "0xcf515fe77845dc82bf838838d5672d6e91aab99e07e4b6605010101209d2aaaa"
}
FieldTypeRequiredDescription
txHashstringYesAptos transaction hash of the APT transfer

Response (200)

{
  "status": "credited",
  "token": "APT",
  "amountApt": 10,
  "amountUsd": 10.34,
  "creditsAdded": 1034,
  "creditBalance": 1134,
  "priceUsed": 1.034,
  "sweepTxHash": "0x620142a23098649baa717237db7226c4a0901485a29fb21baf54a545e62db613"
}

Fields

FieldTypeDescription
statusstringAlways "credited" on success
tokenstringToken type ("APT")
amountAptnumberAmount of APT deposited
amountUsdnumberUSD equivalent (via CoinGecko live price)
creditsAddednumberCredits added to the account
creditBalancenumberNew total credit balance
priceUsednumberAPT/USD exchange rate used
sweepTxHashstring|nullTransaction hash of the platform sweep

Errors

StatusReason
400Missing txHash
401Missing or invalid API key
409Transaction already processed (idempotent)
422Transaction verification failed (invalid hash, wrong recipient, unsupported tx type, or transaction older than 24 hours)
Each txHash can only be used once. Duplicate submissions return 409 with the current balance.
Supported tokens: APT (native Aptos coin). USDC and USDT support coming soon.

Pricing

  • APT → USD conversion uses the live CoinGecko price (cached for 60 seconds)
  • 1 credit = $0.01 USD
  • Example: 10 APT at 1.03/APT=1.03/APT = 10.30 = 1,030 credits