Stablecoin payment API documentation
The public testnet beta uses test USDC on Base Sepolia and Ethereum Sepolia, and test USDT on TRON Nile. There is no real-money charge.
Discover assets with a test key
Issue a project test key in the dashboard. Keep ZERO_TO_ONE_PAY_API_KEY in the server environment. The API origin is https://api.0to1pay.com and the HTTP paths start with /v1.
curl --fail-with-body https://api.0to1pay.com/v1/chain/assets \
-H "Authorization: Bearer ${ZERO_TO_ONE_PAY_API_KEY}"From order to access pass
Register single-use merchant recipients, then create a payment and quote. The buyer signs before transferring and again when submitting the transaction hash. Verify the raw signed webhook, persist the command, then grant access in a worker. The Next.js example runs this flow on Base Sepolia.
Integration resources
- Accept Base USDC in Next.js and grant an access pass with a webhook
- Integration guide (Markdown)
- Try the 0.01 test USDC demo
- Next.js example source (ZIP)
- @0to1pay/server-sdk
- @0to1pay/fulfillment-sdk
- OpenAPI JSON
- Find the merchant and project IDs in project settings
- Test projects and API keys
Networks and connections
GET /v1/chain/assets· List enabled network assets ·payments:readPOST /v1/chain/connections· Create a watch-only connection ·connections:managePOST /v1/connections/{connection_id}/chain-recipients· Register one-use recipient addresses ·connections:manageGET /v1/connections· List project connections ·connections:readGET /v1/connections/{connection_id}· Read connection metadata ·connections:readPOST /v1/connections/{connection_id}/disable· Disable new collection on a connection ·connections:manage
Payments and quotes
POST /v1/payments· Create a payment obligation ·payments:writeGET /v1/payments· List project payments ·payments:readGET /v1/payments/{payment_id}· Read payment, decision and fulfillment ·payments:readGET /v1/payments/{payment_id}/receipt· Read confirmed funds by asset and network ·payments:readPOST /v1/payments/{payment_id}/quotes· Reserve a recipient and freeze the payable terms ·payments:writeGET /v1/quotes/{quote_id}· Read the frozen quote ·payments:readPOST /v1/payments/{payment_id}/attempts· Open the assigned transfer attempt ·attempts:initiateGET /v1/payments/{payment_id}/attempts· List the payment attempts ·payments:readGET /v1/attempts/{attempt_id}· Read a payment attempt ·payments:readPOST /v1/payments/{payment_id}/cancel· Stop new collection attempts ·payments:write
Wallet approval and verification
POST /v1/quotes/{quote_id}/chain-intents· Create a buyer-wallet signing challenge ·payments:writePOST /v1/quotes/{quote_id}/chain-intents/{intent_id}/submit· Submit the signed transaction claim ·payments:writePOST /v1/payments/{payment_id}/verify· Queue evidence verification ·payments:verifyPOST /v1/payments/{payment_id}/reviews· Record an audited payment review ·payments:reviewGET /v1/operations/{operation_id}· Read the result of an operation ·operations:read
Webhooks and events
POST /v1/webhook-endpoints· Register a webhook endpoint ·webhooks:manageGET /v1/webhook-endpoints/{endpoint_id}· Read webhook endpoint metadata ·webhooks:readPOST /v1/webhook-endpoints/{endpoint_id}/rotate-secret· Rotate a webhook signing secret ·webhooks:manageGET /v1/events· Replay events using an opaque cursor ·events:read
Fulfillment
GET /v1/fulfillments/{command_id}· Read a fulfillment command and execution ·fulfillment:readPOST /v1/fulfillments/{command_id}/claim· Claim permission to execute a command ·fulfillment:executePOST /v1/fulfillments/{command_id}/results· Report an execution result ·fulfillment:resultsPOST /v1/fulfillments/{command_id}/retry-delivery· Redeliver the same command ·fulfillment:retry
Subscriptions and usage
GET /v1/billing/plans· List plans, prices and available payment networks and tokens ·billing:readGET /v1/billing/subscription· Read subscription and request usage ·billing:readGET /v1/billing/invoices· List recent subscription invoices ·billing:readPOST /v1/billing/invoices· Create a stablecoin invoice and signing challenge ·billing:writeGET /v1/billing/invoices/{invoice_id}· Read a subscription invoice ·billing:readPOST /v1/billing/invoices/{invoice_id}/submit· Submit the signed subscription transaction ·billing:writePOST /v1/billing/test-keys· Issue a Sandbox server key ·billing:writePOST /v1/billing/keys· Issue a scoped project server key ·billing:write