Merchant Invoices APICreate invoice

Create invoice

Creates a merchant invoice and returns a payment link.

curl -X POST "https://api.example.com/v1/api/v1/create-invoice" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  "amount": "1500.00",
  "callback_url": "https://yoursite.com/webhooks/payment",
  "currency_code": "UAH",
  "customer_id": "user_12345",
  "external_id": "order-2026-0001",
  "fail_url": "https://yoursite.com/payment/failed",
  "purpose": "Payment for Premium subscription",
  "success_url": "https://yoursite.com/payment/success"
}'
{
  "invoice_id": "example_string",
  "external_id": "example_string",
  "amount": "example_string",
  "currency": "example_string",
  "status": "example_string",
  "payment_link": "example_string",
  "customer_id": "example_string",
  "purpose": "example_string",
  "callback_url": "example_string",
  "success_url": "example_string",
  "fail_url": "example_string",
  "created_at": "example_string",
  "expires_at": "example_string",
  "finished_at": "example_string"
}
POST
/api/v1/create-invoice
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-Api-Key)
X-Api-Keystring
Required

Merchant API Key.

Merchant API Key.
Content-Typestring
Required

The media type of the request body

Options: application/json
amountstring
Required

Payment amount in fiat currency. At most 2 decimal places (e.g. 100, 100.5, 100.50). More than 2 decimals is rejected with 422.

currency_codestring
Required

ISO 4217 currency code (3 uppercase letters)

Pattern: ^[A-Z]{3}$
customer_idstring
Required

Unique customer identifier in your system. Used for rate limiting

Max length: 128
external_idstring
Required

Your unique invoice/order ID. Must be unique per merchant.

Max length: 128
purposestring

Payment description shown to customer on payment page

callback_urlstring

HTTPS URL for webhook notifications. Falls back to merchant default if omitted

success_urlstring

URL to redirect customer after successful payment. Falls back to merchant default if omitted

fail_urlstring

URL to redirect customer after failed/expired payment. Falls back to merchant default if omitted

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Merchant API Key.

Body

application/json
amountstring
Required

Payment amount in fiat currency. At most 2 decimal places (e.g. 100, 100.5, 100.50). More than 2 decimals is rejected with 422.

currency_codestring
Required

ISO 4217 currency code (3 uppercase letters)

customer_idstring
Required

Unique customer identifier in your system. Used for rate limiting

external_idstring
Required

Your unique invoice/order ID. Must be unique per merchant.

purposestring

Payment description shown to customer on payment page

callback_urlstring

HTTPS URL for webhook notifications. Falls back to merchant default if omitted

success_urlstring

URL to redirect customer after successful payment. Falls back to merchant default if omitted

fail_urlstring

URL to redirect customer after failed/expired payment. Falls back to merchant default if omitted

Responses

invoice_idstring
Required

Internal invoice ID (UUID). Use this for /payment-methods and /select-method

external_idstring
Required
amountstring
Required

Invoice amount in fiat currency

currencystring
Required
statusstring
Required

pending — awaiting method selection

payment_linkstring
Required

URL to redirect the customer to the payment page

customer_idstring
Required
purposestring
callback_urlstring
success_urlstring
fail_urlstring
created_atstring
Required
expires_atstring
Required

Invoice TTL expiration before method selection. After select-method, deal-level expiration applies

finished_atstring