Skip to main content
POST
Create an invoice

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

Idempotency-Key
string<uuid>
required

A v4 UUID to prevent duplicate requests. Must be unique for each request.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Example:

"123e4567-e89b-42d3-a456-556642440000"

Body

application/json
amount_usd
number<float>
required

Amount in USD

Required range: 0.01 <= x <= 1000000
Example:

99.99

description
string

Description of the invoice

Maximum string length: 255
Example:

"Premium Plan Subscription"

customer_id
string

Optional customer identifier

Maximum string length: 255
metadata
object

Additional structured data (max 512 bytes)

Example:
expires_in
number

Optional expiration time in milliseconds (default 12 hours, max 30 days)

Required range: 1 <= x <= 2592000000
Example:

43200000

receiver_override_enable
boolean

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).

Example:

true

receiver_override_address
string

Pass-through address to receive the merchant settlement amount.

Example:

"0x1111111111111111111111111111111111111111"

invoice_title
string

Optional custom title for the invoice. Defaults to the merchant's company_name if not provided.

Maximum string length: 255
Example:

"Monthly Subscription - Premium Plan"

Optional custom footer text for the invoice. Defaults to the merchant's company_name if not provided.

Maximum string length: 255
Example:

"Thank you for your business!"

customer_email
string<email>

Optional customer email address for receipts and notifications.

Maximum string length: 255
Example:

"customer@example.com"

payment_return_url
string<uri>

Optional return URL for hosted checkout to redirect after payment. Must be HTTPS. If omitted, the merchant default return URL may be used.

Maximum string length: 2048
Pattern: ^https://
Example:

"https://merchant.example.com/checkout/complete"

payment_return_url_enabled
boolean

Controls whether the return URL is used. When false, no redirect is applied even if a URL is set.

Example:

true

questions
object | null

Optional questions to collect during checkout (max 5 questions, max 512 bytes).

Response

Invoice created successfully

invoice_id
string<uuid>

Unique identifier for the invoice

Example:

"123e4567-e89b-12d3-a456-426614174000"

payment_url
string<uri>

Hosted payment page URL (valid until expires_at)

expires_at
integer

Expiration timestamp (epoch seconds).

Example:

1711024496

session_token
string

Payment session token (send as x-session-token to /api/v1/payments/*)

signature
string

Payment session signature (send as x-signature to /api/v1/payments/*)

payment_session_headers
object

Convenience mapping of required payment session headers