Create an invoice
Creates a new invoice on the account bound to the API key. The response includes a hosted payment page URL your customer can use to complete payment in crypto.
Required scope: invoices.create.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Fiat amount charged by the invoice. If a positive amount is sent, it is the invoice total even when items are also sent. Provide at least one of amount or items.
Example
49.99Optional line items shown on the payment page. Used to compute the total only when amount is omitted.
object
ISO-4217 fiat currency code (e.g. USD, EUR).
Example
USDMerchant-side idempotency key. Must be unique within your tenant. Retrying the request with the same orderId returns a 409.
Example
order_2026_04_001Free-form description shown on the payment page.
HTTPS URL to receive webhook notifications about this invoice. Must be a public, TLD-qualified HTTPS URL.
Example
https://merchant.example.com/webhooks/cryptonlyHTTP(S) URL for the “Return to merchant” CTA when the invoice is cancelled or expired. Accepts any http(s) URL, including local development hosts such as http://localhost:8000/....
Example
https://merchant.example.com/orders/order_2026_04_001HTTP(S) URL for the “Return to merchant” CTA when the invoice is paid or overpaid. Accepts any http(s) URL, including local development hosts such as http://localhost:8000/....
Example
https://merchant.example.com/orders/order_2026_04_001/successHTTP(S) URL for the “Return to merchant” CTA when the invoice is failed, suspended, or partially_paid. Accepts any http(s) URL, including local development hosts such as http://localhost:8000/....
Example
https://merchant.example.com/orders/order_2026_04_001/failedInvoice expiry in minutes from creation. Clamped to a server-side maximum. Maximum is 30 days.
Customer ID from your system.
Example
customer_1234567890Custom payload to be sent to the webhook.
Example
{"key1":"value1","key2":"value2"}Optional reference shown to the customer on the payment page (e.g. order or invoice id). If empty - orderId is shown instead.
Responses
Section titled “Responses”Invoice created.
object
Invoice data (same shape as GET /invoice).
object
object
object
Optional reference for the customer on the payment page, when set at creation.
Browser CTA URL for cancelled / expired, when provided at creation.
Browser CTA URL for paid / overpaid, when provided at creation.
Browser CTA URL for failed / suspended / partially_paid, when provided at creation.
ISO 8601 timestamp.
ISO 8601 timestamp.
When payment settled (ISO 8601), if applicable.
Merchant-supplied customer reference when provided at creation.
Opaque string from creation; echoed on webhooks when set.
Hosted payment page URL for this invoice.
Creation channel; omitted when unknown (rows created before this metadata existed).
Example
{ "data": { "status": "created", "cryptoCurrencyCode": "USDT_TRC20", "paymentPageUrl": "https://payment.cryptonly.com/invoice/...", "source": "api" }}Validation error, missing fiat currency, amount below the configured minimum, or the referenced customerId is blocked (exceptions.invoice.customerBlocked).
Missing or invalid x-tenant-api-key header. Code: exceptions.auth.invalidApiKey.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Request origin IP is not on the tenant API allowlist (exceptions.auth.ipNotAllowed), or the API key is missing the scope required by this operation (exceptions.auth.insufficientScope).
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}An invoice with the supplied orderId already exists.
Rate limit exceeded for this endpoint. Retry after the window resets. Code: exceptions.rateLimit.exceeded. The extension.msBeforeNext field tells you how long to wait.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Unexpected server error. Safe to retry idempotent operations after a backoff.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}