Guide

How to accept USDC payments on your website

This guide uses the public invoice API. The example targets Ethereum Sepolia testnet; check the create flow for networks enabled on mainnet before taking real payments.

1. Create an invoice

Send one POST request with the price, your receiving address, the chain and token. Replace 0x… with your own address. Do not send an invoice seed; the API assigns one.

POST /api/invoices
Content-Type: application/json

{
  "price": "10.00",
  "to": ["0x…"],
  "chains": ["11155111"],
  "tokens": ["USDC"],
  "clientInvoiceId": "order-1",
  "chainId": "11155111",
  "token": "USDC",
  "selectedTo": "0x…",
  "title": "Order",
  "allowPartial": false,
  "paymentMode": "crypto"
}

2. Send the customer to checkout

The response contains invoice.invoiceAddress, a payLink and the status awaiting_payment. Redirect the customer to the pay link, or show the address and amount yourself.

3. Confirm payment

Poll GET /api/invoices/:id. Treat paid as funds received on-chain and swept as settled to your address. Partially paid invoices show paid_partial when partial payments are allowed.

GET /api/invoices/:id

4. Respect rate limits

Creating invoices is limited to roughly one request per second per IP. A 429 response includes Retry-After; back off instead of retrying immediately.

Create an invoicePayment APIFree invoice generator