Endpoint
Request
Body parameters
The invoice amount as a decimal string. Up to 8 decimal places.Examples:
"49.99", "1000", "0.00000001"The invoice currency. Typically a fiat currency code (
USD, EUR, GBP) or a stablecoin (USDT, USDC).Your customer sees this amount and currency on the checkout page.A human-readable description shown on the checkout page. For example:
"Pro Plan - Monthly".How long the invoice stays open, in minutes. Minimum
1, maximum 525600 (1 year).If omitted, the invoice does not expire.The URL Settlx will
POST events to for this invoice. Must be a publicly reachable URL. HTTPS is required in production environments.Arbitrary key-value pairs you want to attach to this invoice. All values must be JSON-serializable.Metadata is returned as-is in every webhook event for this invoice under
data.invoice.metadata. Use it to carry your internal IDs (order ID, customer ID, etc.) so you can correlate the payment to your system without a database lookup.Response
Returns201 Created with the invoice object.
Response fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique invoice identifier |
merchantId | string (UUID) | Your merchant account ID |
amount | string | Invoice amount |
currency | string | Invoice currency |
status | string | Always pending at creation |
description | string | null | Description passed at creation |
expiresAt | string | null | ISO 8601 expiry timestamp, or null if no expiry |
webhookUrl | string | null | Webhook URL for this invoice |
paymentUrl | string | Hosted checkout URL — redirect your customer here |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 last-updated timestamp |
Code examples
Errors
| Status | Message | Reason |
|---|---|---|
400 | Amount must be greater than 0 | amount is zero, negative, or not a valid decimal |
400 | Currency is required | currency is missing or empty |
400 | Expires in minutes must be greater than 0 | expiresInMinutes is zero or negative |
401 | Missing or invalid Authorization header | API key not provided or malformed |
401 | Invalid API key | Key not found or has been revoked |
403 | Merchant account is not active | Account is suspended or pending review |