Errors¶
An error is an HTTP status and a JSON body with the error's code in error:
{
"ok": false,
"error": "limit_exceeded",
"currency": "EUR",
"maxAllowedMinor": 12000
}
Some errors carry more fields, listed below. They tell you what would pass, so you can offer it to the customer instead of a plain refusal.
Your request¶
| Code | HTTP | Meaning |
|---|---|---|
unauthorized |
401 | No X-Api-Key, a wrong one, or your account is switched off. |
invalid_json |
400 | The body is not JSON. |
invalid_reference |
400 | reference is empty, longer than 64 characters or has control characters. |
invalid_amount |
400 | Not a positive amount, too many decimals for the currency, or above 10 000 USD. Above the maximum, maxAllowedMinor is the largest amount. |
invalid_currency |
400 | currency is missing or not an ISO code. |
unsupported_currency |
400 | Card payments are not taken in this currency. |
invalid_email |
400 | billingDetails.email is missing or not an email address. |
invalid_callback_url |
400 | callbackUrl is missing, not a public https address, or longer than 500 characters. |
invalid_success_url, invalid_cancel_url |
400 | Not an http(s) address, or longer than 500 characters. |
not_found |
404 | No such order of yours (Get an order). |
rate_limited |
429 | Too many payments created in a minute. Retry after retryAfter seconds (also in the Retry-After header). |
What your account allows¶
These limits are set for your account by your account manager.
| Code | HTTP | Meaning |
|---|---|---|
currency_not_allowed |
400 | Not a currency you take. allowedCurrencies lists those you do. |
country_not_allowed |
403 | Not a country you take customers from, by customer.ip. country is the customer's (empty if unknown), allowedCountries lists yours. |
limit_exceeded |
409 | Today's limit is reached. maxAllowedMinor is the largest amount that passes now; 0 means none today. |
amount_below_minimum |
409 | Below the smallest amount. minAllowedMinor is the smallest that passes. |
maxAllowedMinor and minAllowedMinor are in minor units of your payment's
currency: 12000 in EUR is €120.00.
The order¶
| Code | HTTP | Meaning |
|---|---|---|
order_already_paid |
409 | This reference is paid. orderId is the order. |
reference_taken |
409 | This reference belongs to a payment-link order. Use another one. |
order_processing |
409 | A payment for this order is still being completed. Wait for the callback. |
order_busy |
409 | Another request for this reference is still running. Retry. |
Try again later¶
| Code | HTTP | Meaning |
|---|---|---|
payment_init_failed |
502 | The payment provider did not answer. Retry. |
payments_unavailable |
503 | No payment account can take payments right now. |
rates_unavailable |
503 | Exchange rates are briefly unavailable. Retry later. |