Create an Invoice
Create a new invoice for a merchant checkout flow.
Overview
Use this endpoint to create an invoice and start a payment flow for your customer. Notes:expires_inis milliseconds (default 12 hours, max 30 days).
Authentication
- Merchant server auth:
x-api-keyorAuthorization: Bearer <jwt> - Safe retries: include an
Idempotency-Keyheader onPOSTrequests.
Request
SDK
cURL
Response
Errors
400invalid parameters (missing/invalid amount, invalid metadata, etc.)401missing/invalid merchant auth409idempotency conflict (retry with the sameIdempotency-Keyto safely reuse the original request)
Examples
- Browser checkout: use
session_token+signatureto call/api/v1/payments/*endpoints without exposing server API keys.
Authorizations
API key for authentication
Headers
A v4 UUID to prevent duplicate requests. Must be unique for each request.
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"123e4567-e89b-42d3-a456-556642440000"
Body
Amount in USD
0.01 <= x <= 100000099.99
Description of the invoice
255"Premium Plan Subscription"
Optional customer identifier
255Additional structured data (max 512 bytes)
{
"order_id": "ORD-123",
"items": [{ "id": "SKU-1", "qty": 2 }]
}Optional expiration time in milliseconds (default 12 hours, max 30 days)
1 <= x <= 259200000043200000
When true, the invoice will use a receiver override (pass-through) address for merchant settlement.
Requires receiver_override_address. The settlement network is derived from the merchant's configured
settlement token (or the system default).
true
Pass-through address to receive the merchant settlement amount.
"0x1111111111111111111111111111111111111111"
Optional custom title for the invoice. Defaults to the merchant's company_name if not provided.
255"Monthly Subscription - Premium Plan"
Optional custom footer text for the invoice. Defaults to the merchant's company_name if not provided.
255"Thank you for your business!"
Optional customer email address for receipts and notifications.
255"customer@example.com"
Optional return URL for hosted checkout to redirect after payment. Must be HTTPS. If omitted, the merchant default return URL may be used.
2048^https://"https://merchant.example.com/checkout/complete"
Controls whether the return URL is used. When false, no redirect is applied even if a URL is set.
true
Optional questions to collect during checkout (max 5 questions, max 512 bytes).
Response
Invoice created successfully
Unique identifier for the invoice
"123e4567-e89b-12d3-a456-426614174000"
Hosted payment page URL (valid until expires_at)
Expiration timestamp (epoch seconds).
1711024496
Payment session token (send as x-session-token to /api/v1/payments/*)
Payment session signature (send as x-signature to /api/v1/payments/*)
Convenience mapping of required payment session headers

