Skip to content
Platform documentation
Checkout API
API reference

Checkout API

Create a plan, open a session, and verify direct settlement.

POST /v1/plans

Secret-key operation. Use the provider’s real merchant wallet, not a platform-wide collection wallet.

json
{
  "feature": "ocr",
  "name": "Document credits",
  "amount": "10.00",
  "credits": "100",
  "ttl_seconds": 2592000,
  "interval": "once",
  "merchant_wallet": "0xYOUR_PROVIDER_WALLET"
}

Replace the wallet placeholder with a valid 20-byte EVM address. GET /v1/plans lists plans; GET /v1/plans/:id reads one, subject to provider scope.

Provider binding

This deployment establishes provider context through the authenticated console BFF and signed provider-scope headers. A caller-supplied provider_id is not authority. Use Plans in the console to create provider-owned live plans; an unscoped legacy plan cannot silently use a platform gas wallet.

POST /v1/checkout-sessions

json
{
  "plan_id": "your-plan-id",
  "holder": "customer-123",
  "billing_email": "customer@example.com",
  "expires_in": 3600
}

Secret and appropriately scoped customer credentials can create sessions; publishable keys cannot. Optional worker_id binds the resulting grant to a worker. Omitting worker_id keeps human checkout independent of the configured MCP worker. Open /checkout?session=SESSION_ID on the console origin.

GET /v1/public/checkout/:id

Returns the public checkout view, including status, amount, payment configuration, and plan. The session identifier is required. Use the checkout’s actual configured network and token.

The payment.usdt response field and wallet-helper usdt option are legacy API names for the explicitly configured payment token. On the current public Fuji configuration that token is USDC. Match its address and six-decimal units rather than inferring the asset from the field name.

POST /v1/public/checkout/:id/confirm

json
{
  "payment_tx": "0xYOUR_TRANSACTION_HASH",
  "customer_wallet": "0xYOUR_PAYING_WALLET",
  "payment_signature": "0xYOUR_PAYMENT_AUTHORIZATION_SIGNATURE"
}

Use the platform checkout UI or wallet helper to produce the authorization signature. It binds the paying wallet, transaction, network, and checkout context. A hash alone does not authorize redemption. Payment confirmation validates the receipt and records the entitlement.

Pending is not failed settlement

If verification reports a pending receipt, retry confirmation for the same checkout and transaction after confirmations arrive. Do not send another transfer just because the HTTP response is not yet successful.

Bagseven documentationemail and wallet · Avalanche · Registry