Skip to content
CorbelBeta

x402

x402 paid toolsReading
How an agent pays
  1. 01AskCall the tool with no payment. The answer is 402 with the price, the wallet to pay and what to sign.
  2. 02SignSign a USDG transfer authorization for that price. The agent pays no gas.
  3. 03Call againSend the same request with the signature in X-PAYMENT. Corbel checks it, runs the tool, settles on chain.
  4. 04Get the answerIt comes once the payment is in a block, with the transaction in X-PAYMENT-RESPONSE. A failed tool is never charged.
# 1. ask: 402 with the price and what to sign
curl -i "https://corbel.finance/api/x402/token?q=<token>"

# 2-3. sign the USDG authorization, then call again
curl "https://corbel.finance/api/x402/token?q=<token>" \
  -H "X-PAYMENT: <base64 of the signed payment>"

Network eip155:4663 (Robinhood Chain) · asset USDG · the full list for agents is at /api/x402

Paid calls