Skip to content
dataruma

DocsMarkdown version

Top up with USDC

POST /v1/topups uses x402 version 2, scheme exact. One micro-USD of credit is one USDC atomic unit.

  1. 1

    Call POST /v1/topups with Authorization: Bearer and JSON { "amount_micro_usd": 1000000 }. The minimum is 10,000 ($0.01). The maximum is 1,000,000,000 ($1,000). Do not send PAYMENT-SIGNATURE on the first attempt.

  2. 2

    The gateway answers 402. The PAYMENT-REQUIRED header is base64 JSON: x402Version 2, resource, and accepts[]. Each accepts entry uses scheme exact.

  3. 3

    For Solana, choose network solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp and USDC asset EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. Base (eip155:8453) is also accepted when a Base recipient is configured. The recipient address is not in source.

  4. 4

    Sign that requirement with an x402 client and your wallet, then retry the same request with the PAYMENT-SIGNATURE header.

  5. 5

    A verified settlement is credited once (201). Replaying the same payment returns 200 and does not credit again. PAYMENT-RESPONSE carries the settlement.

Solana
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Base
eip155:8453
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

The public x402.org facilitator settles testnets only. Solana and Base mainnet need the facilitator configured on the Worker, such as CDP or PayAI. Xendit is not used.

Top up the property API with USDC · Dataruma