Skip to main content

Errors Reference

See the Error Handling guide for code examples and best practices.

Error object​

{
"error": {
"type": "card_error",
"code": "insufficient_funds",
"message": "Your card has insufficient funds.",
"param": "payment_method",
"request_id": "req_8Xn1A4qZpKvTm2",
"charge": "ch_ChargeId"
}
}

Error types​

TypeHTTP statusDescription
api_error500Something went wrong on Meridian's servers. Retry with exponential backoff.
authentication_error401Invalid, expired, or missing API key.
card_error402The card was declined. The message is safe to show to the customer.
idempotency_error409Idempotency key reused with different parameters.
invalid_request_error400Invalid parameters. Fix the request before retrying.
rate_limit_error429Too many requests. Back off and retry.

Card decline codes​

CodeDescription
card_declinedGeneric decline. Check the decline_code field for more detail.
insufficient_fundsThe card has insufficient funds.
lost_cardThe card has been reported lost.
stolen_cardThe card has been reported stolen.
expired_cardThe card is expired.
incorrect_cvcThe CVC is incorrect.
incorrect_numberThe card number is incorrect.
processing_errorError during processing. Retry.
do_not_honorGeneric decline from the issuing bank.
authentication_required3D Secure authentication is required.

Rate limits​

The API allows 100 requests per second per secret key. Exceeding this returns a 429 error. Respect the Retry-After header in the response.

Request IDs​

Every API response includes a request-id header (e.g., req_8Xn1A4qZpKvTm2). Include this in any support request to help the Meridian team trace the exact API call.