Errors

One error format, stable types, and codes you can rely on.

Every error has the same shape:

{
  "error": {
    "type": "invalid_request",
    "code": "invalid_parameter",
    "message": "amount must be a positive decimal with at most 2 decimals for PEN.",
    "param": "amount",
    "request_id": "req_6d665507f62a5773882fc053"
  }
}
FieldWhat it is
typeThe error type. Stable.
codeThe specific reason. Stable. Decide based on type and code.
messageHuman-readable text. It can change: don't parse it.
paramThe field or header with the problem, when there is one.
reasonsClosed list of reasons, on the codes that have them (risk_blocked, payout_not_cancellable).
request_idThe same value as the X-Request-Id header. Give it to support.

Types

typeHTTPWhat happenedRetry?
invalid_request400, 405, 413, 415, 422The request is malformed (400) or can't be executed (422).Only after fixing it.
authentication_error401The key is missing or invalid.No.
permission_error403The key doesn't have the scope.No.
not_found404It doesn't exist, or it belongs to another account.No.
conflict409It conflicts with something that already exists.No.
rate_limited429Too many requests.Yes, after Retry-After.
unavailable503Unavailable for now.Yes, with the same Idempotency-Key.
internal_error500An error on our side.Yes, with the same Idempotency-Key.

Common codes

Malformed request (400)

codeWhen
invalid_parameterA field or parameter isn't valid. param tells you which one: amount, currency, details.cci, payer, Idempotency-Key…
invalid_bodyThe body isn't JSON, has an unknown field, or has the wrong type (for example, an amount as a number).
invalid_requestThe request isn't valid in general.
idempotency_key_requiredIdempotency-Key is missing where it's required.
body_too_large (413)The body exceeds 64 KiB.
unsupported_media_type (415)The Content-Type isn't application/json.

Can't be executed (422)

codeWhen
unsupported_methodThat method and currency aren't in capabilities.
amount_requiredThat pay-in is a one-time payment: send amount.
one_payment_unavailableThat pay-in is an account that accepts any deposit: don't send amount.
amount_below_minimumThe amount is below that pay-in's minimum: see min_amount in GET /v1/capabilities.
amount_above_maximumThe amount is above that pay-in's maximum: see max_amount in GET /v1/capabilities.
amount_below_feeThe amount does not cover the method's fee: see fee_bps and fee_fixed in GET /v1/capabilities.
insufficient_fundsYour available balance isn't enough.
quote_expiredThe quote expired: request a new one.
quote_mismatchThe quote isn't for the beneficiary's method or currency.
pricing_unavailableThere's no price for that operation right now.
amount_too_smallThe amount is below the minimum.
same_currencyThe requested conversion is to the same currency.
limit_exceededIt exceeds a limit on your account.
customer_not_activeThe beneficiary's customer isn't active.
risk_blockedRisk rules stopped it; see reasons.
refund_not_supportedThat pay-in doesn't support refunds.
too_many_endpointsYou already have 10 webhooks.

Not allowed (403)

codeWhen
insufficient_scopeThe key doesn't have the scope (read or write) the request needs.
verification_requiredLive, on an account you opened yourself: your company's verification isn't approved yet. Sandbox works meanwhile. See Go live.
insufficient_roleOnly a member signed in to the dashboard can do it (for example, managing API keys, or adding an allowed IP: an owner or admin).
ip_allowlist_requiredA key moving money while your account has no active allowed IP. Add your servers' addresses in Settings → Allowed IPs; see Authentication.
ip_not_allowedA key moving money from an address that isn't one of your allowed IPs. The message says which address we saw.
step_up_requiredAdding an allowed IP needs a fresh confirmation of your second factor (or password or passkey).

Conflict (409)

codeWhen
idempotency_key_reusedYou used the same Idempotency-Key with a different request.
quote_already_usedThe quote already funded another operation.
external_id_conflictYou already have a customer with that external_id and different details.
customer_closed, customer_blockedThe customer is closed or blocked.
payout_not_cancellableThe payout can no longer be canceled; see reasons.
too_many_api_keysThe account already has 20 active API keys: revoke one first.
allowed_ip_existsThat address is already on your allowed IPs.
too_many_allowed_ipsAt most 3 allowed IPs: remove one to add another.

Unavailable (503)

codeWhen
operation_suspendedThe operation is suspended for now (capabilities shows reason: suspended).
temporarily_unavailableA momentary problem. Retry with the same key.

The full list for each endpoint is on its page in the reference.

Rate limits

There's a request limit per key. When you exceed it you receive 429 rate_limited with Retry-After, the number of seconds you must wait. Spread out your queries and prefer webhooks over polling in a loop.

Useful headers

HeaderDirectionPurpose
X-Request-IdResponseIdentifies the request (req_…). Store it in your logs.
X-Correlation-IdRequest and responseYour own identifier (8 to 128 characters from A-Z a-z 0-9 . _ : -); we echo it back.
Retry-AfterResponseOn a 429, how many seconds to wait.
Idempotent-ReplayedResponsetrue when the response is a replay of an earlier request.

New values

Statuses, reasons, and codes are closed lists, but they can grow. Treat a value you don't recognize as "unknown", not as an error in your integration.

Sur cette page