API Reference
Integration Guide
Three steps to collect payments: create an invoice, let the payer settle through x402 or browser, and confirm completion.
Base URL
https://x402invoices.com/apiPOST/api/invoices
Create an invoice by specifying the recipient, accepted networks, amount, and token. The response includes an invoiceId and a shareable payment url. Optionally include a webhookUrl to receive a callback when payment settles.
Required
payTostringnetworksstring[]amountstringtokenstringOptional
expiresAtstring?webhookUrlstring?orderIdstring?metadataobject?cURL
curl -X POST "https://x402invoices.com/api/invoices" \
-H "Content-Type: application/json" \
-d '{
"payTo": "alice",
"networks": ["base", "arbitrum", "solana"],
"amount": "10.50",
"token": "USDC",
"webhookUrl": "https://example.com/webhooks/invoice-paid",
"orderId": "order-123"
}'Response201 Created
JSON
{
"invoiceId": "inv_abc123",
"url": "https://x402invoices.com/inv/inv_abc123"
}