ZyloPaydocs

Error codes

Every error code the API returns, its HTTP status and type, and every payment decline code.

Errors use HTTP status codes and one body shape. Branch on type and code; never parse message. See Errors for how to handle them.

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "amount must be a positive integer (USDC atoms)",
    "param": "amount",
    "request_id": "6f1c2a9e-3b7d-4c55-9a0e-2d4b8f1e7c30"
  }
}

The error object

typestring

One of: invalid_request_error, authentication_error, permission_error, idempotency_error, rate_limit_error, api_error

codestring

Stable, machine-readable code (see the error code catalogue).

messagestring

Human-readable explanation. May change; do not parse it.

paramstring

The parameter (or header) at fault.

request_idstring

The Request-Id of the request; quote it to support.

permission_error

CodeHTTPMeaning
account_disabled403The merchant account is disabled. Read-only requests still work. Contact ZyloPay support.
account_restricted403An account involved in this action cannot be used with ZyloPay right now. Nothing was done. Contact ZyloPay support.
insufficient_scope403The API key lacks the scope this endpoint requires (see required_scope in the message).
ip_not_allowed403The request IP is not in the API key's IP allowlist.
kyb_required403Live mode needs an approved business verification (KYB) for this action.
publishable_key_not_allowed403Publishable keys cannot call this endpoint; use a secret key from your server.

invalid_request_error

CodeHTTPMeaning
account_not_live409The merchant is not registered on this network yet (go live from the dashboard first).
amount_too_large400The amount exceeds what is allowed (for a refund: the amount still refundable).
api_version_invalid400The ZyloPay-Version header names a version that does not exist.
cursor_invalid400The pagination cursor is malformed or belongs to another list.
network_mismatch400An X-Network header was sent that contradicts the API key's mode. API keys choose the network; omit the header.
parameter_invalid400A parameter has an invalid value (see param).
parameter_missing400A required parameter is missing (see param).
parameter_unknown400The request contains a parameter the endpoint does not accept (see param).
payment_already_refunded409The payment has already been fully refunded.
payment_intent_unexpected_state409The payment intent is not in a state that allows this action (see message).
refund_daily_limit_reached409The account's daily refund limit would be exceeded.
refund_in_progress409Another refund of this payment is being sent; retry after it completes.
refund_window_expired409The payment is older than the refund window of the account.
resource_missing404No such object for this account and mode.
terminal_inactive409The terminal is deactivated.
webhook_endpoint_disabled409The webhook endpoint is disabled; enable it first.
webhook_endpoint_limit_reached400The account has the maximum number of webhook endpoints for this mode.
webhook_url_forbidden400The URL resolves to a private, loopback, link-local or otherwise reserved address.
webhook_url_invalid400The URL is not a valid absolute http(s) URL, uses http in live mode, or carries credentials.

authentication_error

CodeHTTPMeaning
api_key_expired401The API key has passed its expiry (for example the overlap window of a rotation ended).
api_key_invalid401The API key is malformed or unknown.
api_key_missing401No API key was sent. Send Authorization: Bearer <secret key>.
api_key_revoked401The API key was revoked.

idempotency_error

CodeHTTPMeaning
idempotency_key_invalid400The Idempotency-Key must be 1-255 printable ASCII characters.
idempotency_key_required400This endpoint moves money and requires an Idempotency-Key header.
idempotency_key_reused409The Idempotency-Key was already used with a different request (method, path or body).
idempotency_request_in_progress409A request with this Idempotency-Key is still being processed (or was interrupted). Do not retry with a new key before checking the outcome.

api_error

CodeHTTPMeaning
internal_error500Something went wrong on ZyloPay's side. A retry with the same Idempotency-Key replays this error: check the object, then retry with a new key only if nothing happened.
request_timeout503The request exceeded its time budget and keeps running. Retry with the same Idempotency-Key (it never runs twice): you get its real outcome once it finished, idempotency_request_in_progress until then.
service_unavailable503A dependency is temporarily unavailable. A retry with the same Idempotency-Key replays this error: check the object, then retry later with a new key only if nothing happened.

rate_limit_error

CodeHTTPMeaning
rate_limited429Too many requests for this API key. Wait for Retry-After seconds.

Payment decline codes

A declined or failed tap is not an HTTP error. The payment intent stays open (until it expires) and reports the reason in last_payment_error.code, and a payment_intent.payment_failed event is sent. The customer can try again, for example with another pass. refund_failed and settlement_reverted also appear as failure_code on a failed refund.

CodeMeaning
pass_revokedThe wallet pass was revoked.
pass_frozenThe wallet pass is frozen.
pass_wrong_networkThe wallet pass was issued for the other network.
authorization_requiredThe wallet pass has no payment authorization; the payer must re-create it.
authorization_expiredThe payer's spending approval expired; the payer must renew the pass.
amount_exceeds_approvalThe amount is above the payer's spending approval.
payer_frozenThe payer's account is frozen.
terminal_daily_limitThe terminal reached its daily volume cap.
risk_declinedThe payment was declined by risk rules.
step_up_deniedThe payer or the cashier declined the confirmation request.
step_up_expiredThe payer did not confirm in time.
session_invalidThe payment session was invalid, expired or already used.
order_already_paidAnother payment of this order_id is settled or in progress; nothing was charged by this attempt. Check that payment before charging again.
credential_invalidThe pass credential presented at the terminal is unknown or invalid.
merchant_disabledThe merchant account is disabled.
kyb_requiredLive payments need an approved business verification.
account_restrictedThe payer's account cannot be used with ZyloPay right now. Nothing was charged.
settlement_failedThe on-chain settlement failed; nothing was charged.
settlement_revertedThe on-chain transaction reverted; nothing was charged.
refund_failedThe on-chain refund failed; nothing was returned.
processing_errorThe payment could not be processed.

On this page