Every failure has the same shape, whatever went wrong.
{
"error": {
"type": "card_error",
"code": "card_declined",
"message": "Insufficient funds.",
"decline_code": "insufficient_funds",
"payment": "pay_7f3a2c…",
"doc_url": "https://ronda.am/docs/errors#card_declined"
}
}type tells you how to react; code is the stable machine-readable identifier; message is safe to show a human. param appears when a specific field was at fault, and a decline carries payment — the id of the failed payment, which you can fetch like any other. A few errors carry one more field: payment on charge_pending and subscription_busy (the charge they wait on), amount on amount_changed, charged on subscription_changed, and period_charge on plan_unchanged. Internal detail — bank payloads, SQL, stack traces — never crosses this boundary.
Every response, success or failure, carries a ronda-request-id header. Quote it when you ask us about a request — it finds the exact line in our logs.
| Type | Status | What it means |
|---|---|---|
invalid_request_error | 400 / 404 / 409 | Something about the request was wrong: a missing parameter, a bad value, an unknown object (404) — or the object is not in a state for it yet (409: charge_pending, subscription_busy, amount_changed). |
authentication_error | 401 | The API key was missing, malformed, unknown or revoked. |
permission_error | 403 | Authenticated, but not allowed: a missing scope, a blocked IP, a suspended account, or live payments not open for this business yet. |
card_error | 402 | The bank declined. Look at decline_code. |
rate_limit_error | 429 | Too many requests. Retry-After tells you when. |
idempotency_error | 409 | An Idempotency-Key was re-used with a different body, or is still in flight. |
api_error | 500 | Something failed on our side. Retry; the payment intent is already recorded. |
| Code | What to do |
|---|---|
parameter_invalid | A value was the wrong type, out of range or malformed. `param` names the field. |
parameter_missing | A required field was not sent. `param` names it. |
parameter_unknown | A field this endpoint does not take — usually a typo; the message suggests the name you probably meant. Unknown fields are refused rather than ignored, so a request never quietly does less than you wrote. |
resource_missing | No object with that id exists for this key's merchant and mode. A test-mode id never resolves with a live key, or the other way round. |
api_key_missing | No key was sent. Use `Authorization: Bearer sk_test_…`. |
invalid_api_key | The key is not one Ronda issued, or it has been rolled. |
api_key_revoked | The key was revoked on the Developers page. |
publishable_key_not_allowed | A publishable key (pk_…) can only create checkout sessions. Use a secret key from your server. |
publishable_key_needs_price | A publishable key can open a checkout only for a price you set up in Ronda: type `subscription` with a `plan`. An `amount`, any other `type` (it defaults to `payment`), or a `description` is refused, and `param` names which. Create that checkout on your server with a secret key, or share a payment link. |
missing_scope | A restricted key without the scope this endpoint needs. |
ip_not_allowed | The key has an IP allowlist and this request came from elsewhere. |
idempotency_key_in_use | The same Idempotency-Key was sent with a different body, or the first request is still running. Use a new key for a new operation. |
currency_required | An amount was sent without its `currency`. There is no default: send AMD, USD or EUR with every amount — prices, payments, invoices, links, checkout sessions with an amount, credit, and coupons with `amount_off`. |
currency_mismatch | A `currency` different from the price's, on something built on a `plan` (a subscription checkout or a plan's payment link). Leave it out, or send the price's own. |
currency_not_enabled | Live mode, USD or EUR: this currency is not switched on for the business yet. Turn it on in Settings → Bank once the bank has enabled it on the terminal. Nothing was created. |
currency_off_at_bank | Live mode, USD or EUR: switched on in Ronda, but the bank says the terminal does not take it. The business has to ask its bank. |
amount_too_large | More than one charge or price may be: ֏100 000 000, or 250 000.00 in USD/EUR. Usually a typo with extra zeros. |
amount_too_small | A customer typed less than the minimum into a choose-your-amount payment link: ֏100, $1.00 or €1.00. |
promotion_codes_need_secret_key | `coupon` and `allow_promotion_codes` on a checkout session need a secret key: a publishable key is public, and anyone could use it to try codes. |
auto_redirect_needs_secret_key | `auto_redirect` on a checkout session needs a secret key. With a publishable key the receipt shows a Continue button instead. |
success_url_required | `auto_redirect: true` was sent without a `success_url` to send the customer to. |
insufficient_credit | A credit take-back larger than the customer's balance in that currency. Nothing changed; the message names the balance. |
refund_exceeds_balance | The refund is more than what is left on the payment after earlier refunds. |
refund_not_supported | The payment was made with Idram (`method: idram`). Idram has no refund request: the business returns the money from its Idram account and records the refund on the payment's page in the dashboard. |
idram_unavailable | `method: idram` on a checkout session, but Idram is not switched on for this business in this mode (Dashboard → Settings → Payment methods). |
idram_not_supported | `method: idram` on a checkout that Idram cannot pay: it takes one-time payments in AMD only — not subscriptions, saved cards or other currencies. |
method_unavailable | The `method` named on a checkout session is not available (`telcell`). |
payment_method_inactive | `POST /v1/payments` named a card that has been removed. Nothing was sent to the bank. |
payment_not_refundable | Only a succeeded (or partly refunded) payment can be refunded. |
refund_outcome_unknown | The bank did not answer a refund, or an earlier refund on this payment is still unconfirmed. Do not refund again: the refund stays pending, its amount stays reserved, and Ronda settles it with the bank. Check `GET /v1/refunds?payment=…` later. |
plan_inactive | The price is archived. Restore it, or use one that is still offered. |
link_inactive | The payment link was switched off. |
link_expired | The payment link's expiry date has passed. |
link_exhausted | The payment link reached its maximum number of uses. |
velocity_ip_blocked | Too many card attempts from one address in a short time — Ronda's card-testing guard. Real customers rarely see it; wait and retry. |
velocity_customer_blocked | Too many card attempts for one customer in a short time. Wait and retry. |
velocity_merchant_blocked | Live mode only: too many card attempts, or too many declined ones, for this business in a short time, whatever address they came from. New card attempts pause for the window and Ronda is alerted. If it is real traffic, contact support to raise the ceiling. |
coupon_invalid | The `coupon` on a checkout session cannot be applied: it is archived, past its `redeem_by` date, used up — including when every remaining redemption is held by other open checkouts — or takes an amount off in another currency. |
coupon_not_usable | The `coupon` on a payment link cannot be used now, for the same reasons as coupon_invalid. |
promotion_code_invalid | A code a customer typed on the hosted checkout was not accepted. They see "This code isn't valid." whatever the reason. |
coupon_field_fixed | What a coupon gives — `percent_off`, `amount_off`, `currency`, `duration`, `duration_in_months` — and its `code` cannot change once it exists; `param` names the field. Make a new coupon. To archive one, use DELETE. |
coupon_archived | An archived coupon cannot be edited or applied. |
coupon_changed | The coupon was changed by someone else while this update was being made. Read it again and retry. |
max_redemptions_lowered | `max_redemptions` can be raised or removed (null), never lowered or set below `times_redeemed`. |
coupon_currency_mismatch | An amount-off coupon is in one currency and the subscription is billed in another. Use a percentage coupon, or one in the subscription's currency. |
test_mode_only | Only possible with a test key — simulating a renewal, for example. |
charge_pending | 409: the bank has not answered about a charge yet; `payment` names it. Nothing changed. Ronda asks the bank and finishes it — for a plan change, `subscription.plan_changed` or `subscription.plan_change_failed` says how it ended. |
subscription_busy | 409: a renewal or plan change on this subscription has not finished — it is at the bank, waiting for a lost reply, or applied but not yet complete; `payment` names its charge when there is one. Nothing was changed or charged. Retry after the event that ends it: a renewal's subscription.updated / recovered / past_due / canceled, a plan change's subscription.plan_changed / plan_change_failed, a first charge's subscription.activated. |
subscription_changed | 400: the subscription changed under a plan or quantity change. `charged: false` — it changed after you read it; nothing was charged; read it again and retry. `charged: true` with `payment` — a reset or prorated/quantity change whose subscription was canceled or paused while its charge was at the bank; the plan did not change and that charge is being refunded: refund.succeeded and payment.refunded follow when the bank confirms (refund.failed first if it refuses — Ronda keeps at it); do not retry blindly. |
plan_interval_mismatch | 400: a prorated plan change between two prices on different schedules (monthly and yearly, or a different `interval_count`). The difference for the days left cannot be worked out. Send `billing_cycle_anchor: "now"` to charge the full new price and start a new period, or `prorate: false` to change the plan with no money now. |
billing_cycle_anchor_conflict | 400: `prorate: true` beside `billing_cycle_anchor: "now"`. A reset charges the new plan in full and gives no credit, so it cannot be prorated. Leave `prorate` out or send false. |
subscription_paused | 400: a paused subscription cannot start a new period (`billing_cycle_anchor: "now"`). Resume it first. |
subscription_past_due | 400: the subscription has a failed payment. Collect it first — `retry`, or a new card — then change the plan. |
subscription_not_active | 400: only an active or trialing subscription can start a new period. |
subscription_ending | 400: the subscription is set to cancel at the end of its period. Withdraw the cancel (`cancel_at_period_end: false`), then change the plan. |
subscription_pause_scheduled | 400: the customer has a pause scheduled. It has to be withdrawn before the plan can change with a new period. |
subscription_invoiced | 400: the subscription is billed by invoice, so there is no card to charge now. |
renewal_due | 400: the subscription's renewal is due within ten minutes, overdue, or being charged. Try the change again once the renewal has gone through. |
subscription_incomplete | 400: a pause asked for while the subscription's first charge is still being processed. Wait for subscription.activated or subscription.past_due, then pause. |
idempotency_amount_mismatch | 409, prorated changes and quantity updates only (never a reset): a charge already exists under Ronda's own key for this change (not your Idempotency-Key) for a different amount; nothing was charged. Never permanent — a left-behind charge is given up after 10 minutes and the next request becomes a new attempt. Retry later with a fresh Idempotency-Key. |
amount_changed | 409: the amount to charge is no longer the `expected_amount` you sent; `amount` is the new one. Nothing was charged. Show it and send it again. |
plan_unchanged | 400: the subscription is already on that plan and quantity, so this request changed and charged nothing. `period_charge` is the earlier change that put it there, or null. |
refund_failed | The bank refused the refund. The message carries its reason; nothing was refunded. |
dispute_closed | The chargeback is decided or past its evidence deadline, so evidence can no longer be added. |
bank_not_connected | Live payments need a bank connected on the Settings page. Test mode works without one. |
onboarding_incomplete | The account has not finished onboarding, so live payments are not available yet. |
live_not_open | Live payments are not open for this business's bank yet. Test mode works meanwhile; retrying does not help. |
fee_card_required | Live mode: the business has not added the card Ronda bills its own fee to (Take real payments in the dashboard), so a real checkout cannot be opened yet. Test mode works without it. |
url_invalid | A webhook URL that does not parse as a URL. |
url_insecure | A webhook URL that is not https. |
url_port_blocked | A webhook URL on a port other than 80 or 443. |
url_credentials | A webhook URL with a username or password in it. Authenticate with the signature instead. |
url_blocked | A webhook host that can never be reached: localhost, *.internal, *.local. |
url_unresolvable | The webhook's hostname does not resolve in DNS. |
url_private_address | The webhook's hostname resolves to a private, loopback or link-local address. |
own_vpos_required | Live payments need the business's own vPOS. Test mode works without one. |
account_suspended | Processing is suspended on this account, usually for an unpaid Ronda invoice. The dashboard's Billing page says why. |
rate_limit_exceeded | Too many requests. Wait for the number of seconds in Retry-After. |
request_too_large | The request body is over the size limit of 256 KB. |
internal_error | Something failed on Ronda's side. Retrying with the same Idempotency-Key is safe. |
Normalised across banks, so your handling does not change when Ronda adds a second bank.
| Code | What to do |
|---|---|
card_declined | The issuer refused without a specific reason. Ask the customer to try another card. |
insufficient_funds | Not enough money on the card. The most common real decline — worth retrying later, which is what dunning does. |
expired_card | The card has expired. Only the customer can fix this; send them a portal link. |
incorrect_cvc | The security code did not match. |
authentication_required | 3-D Secure was required and not completed. |
binding_inactive | The saved card is no longer valid at the bank. Ask the customer to add a card again. |
limit_exceeded | The amount is above the card's limit. |
attempts_exhausted | The customer used every try the bank's page allows on one order, and each was refused. The bank reports only that, not why each try failed. A new checkout starts fresh. |
processing_error | The bank could not process the card. Safe to retry. |
recurring_revoked | The cardholder told their bank to stop this business's automatic payments. Ronda never charges that card again: the subscription is canceled at once and the saved card is retired. The customer can add a card again in the portal. |
A 500 or a network timeout does not mean the payment failed — it means you do not know. Retry the request with the same Idempotency-Key: if the first attempt succeeded you get the original payment back, and if it did not, the charge happens exactly once. Never retry with a fresh key.
300 requests per minute per API key, and 120 per minute per IP on the unauthenticated surfaces. A publishable key also allows each visitor's IP 30 a minute, so one visitor cannot use up the key for everyone else. A 429 carries a Retry-After header in seconds. Card-testing velocity limits apply separately to checkout attempts: 10 per IP (for checkouts opened with a publishable key, where the caller is the customer's browser) and 6 per customer in a ten-minute window, and in live mode 100 per business, or 20 declined ones, across every address. A business can make at most 50 refunds in 24 hours, and POST /v1/subscriptions/:id/retry runs at most three times a day for one subscription.