Creates a new invoice and returns a payment URL for the checkout/payment session integration.
The idempotency key must be a v4 UUID generated on the client side.
Optionally set a pass-through settlement address using receiver_override_* fields.
Example UUID v4 generation in JavaScript:
import { v4 as uuidv4 } from 'uuid';
const idempotencyKey = uuidv4();
API key for authentication
A v4 UUID to prevent duplicate requests. Must be unique for each request.
"123e4567-e89b-42d3-a456-556642440000"
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.
255Optional return URL for hosted checkout to redirect after payment. Must be HTTPS. If omitted, the merchant default return URL may be used.
2048"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).
Invoice created successfully
Unique identifier for the invoice
"123e4567-e89b-12d3-a456-426614174000"
Hosted payment page URL (valid until expires_at)
"2024-03-21T12:34:56Z"
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