Skip to Content
RunePayDocs

Errors

The error shape and every code the API returns.

Every non-2xx response has the same body. Branch on type and code; message is for people and may change.

{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_amount",
    "message": "amount is required, in minor units (e.g. 1999 for $19.99).",
    "param": "amount",
    "request_id": "req_01KA4XZY8T2R5M7P1Q4W6E8R0T",
    "doc_url": "https://runepay.co/docs/api/errors#invalid_amount"
  }
}
Field
typeOne of the 6 types below.
codeA stable, machine-readable code from the tables below.
messageA human-readable explanation.
paramThe parameter at fault, as a path such as enabled_events[1], when there is one.
object_idOnly on secret_not_replayable: the object the original request created or changed.
request_idThe same value as the Request-Id response header. Quote it when you contact support.
doc_urlA link to this page, at the code.

Unknown body parameters are rejected with parameter_unknown, so typos fail loudly instead of being ignored.

invalid_request_error

The request was wrong: a missing or malformed parameter, an object that does not exist, or one in the wrong state. Fix the request before retrying.

CodeStatusMeaning
invalid_json400The request body is not valid JSON or is not a JSON object.
body_too_large413The request body is larger than 256 KB.
invalid_line_items400Pass 1–100 valid inline price_data line items.
invalid_expires_at400expires_at must be 30 minutes to 24 hours from now.
parameter_missing400A required parameter is missing.
parameter_unknown400The request has a parameter this endpoint does not accept.
parameter_invalid_string400The parameter must be a string.
parameter_invalid_integer400The parameter must be an integer.
parameter_invalid_number400The parameter must be a number.
parameter_invalid_boolean400The parameter must be true or false.
parameter_invalid_array400The parameter must be an array.
parameter_invalid_object400The parameter must be an object.
parameter_invalid_empty400The parameter must not be empty.
parameter_invalid_value400The parameter's value is not allowed (out of range, wrong format, or not one of the listed values).
invalid_limit400limit must be an integer from 1 to 100.
invalid_cursor400starting_after is not an object this key can see.
invalid_created400A created[…] filter is not a unix timestamp in seconds.
invalid_status400status is not one of the allowed values.
invalid_amount400The amount is missing, not a positive integer in minor units, or outside what the object allows.
invalid_currency400The currency is not a three-letter ISO 4217 code.
unsupported_currency400The currency is not enabled for this account.
invalid_url400The URL is not an allowed absolute URL (http(s) for redirects, public HTTPS for webhooks).
invalid_email400The email address is not valid.
invalid_name400name is missing or too long.
invalid_description400description is not a string or is too long.
invalid_active400active must be true or false.
invalid_events400enabled_events must be a nonempty list of event types.
invalid_event400event_id is required.
invalid_immediate400immediate must be a boolean.
invalid_request400Required parameters are missing or malformed.
invalid_input400The hosted checkout request is malformed.
invalid_action400The hosted checkout action is not recognised.
invalid_dispute400The dispute data from the processor is not valid.
missing_payment400payment is required.
missing_token400The card token is missing.
unsupported400The operation is not supported for this payment or processor.
not_found404No such object for this key's organization and mode.
payment_link_unavailable404The payment link cannot take payments right now (503 when the cause is temporary).
payment_link_inactive410The payment link is deactivated.
checkout_expired410The checkout session has expired.
checkout_closed409The checkout session is already complete.
amount_out_of_range400The buyer-chosen amount is outside the payment link's min_amount and max_amount.
invalid_payment_transition409The payment cannot move to that status from its current one.
payment_in_progress409The payment already has a processor attempt in progress.
payment_not_confirmable409The payment cannot be confirmed in its current status.
not_refundable409The payment cannot be refunded in its current status, or the amount exceeds what is left.
refund_not_ready409The processor reported a refund before RunePay recorded it.
processor_mismatch409The processor's data does not match the payment.
endpoint_disabled409The webhook endpoint is disabled. Enable it first.
rotation_in_progress409A previous signing secret is still in its overlap window. Wait, or rotate with immediate: true.

authentication_error

No API key, or an unknown or revoked one.

CodeStatusMeaning
invalid_api_key401No API key, or the key is unknown or revoked. Send Authorization: Bearer sk_….

permission_error

The key is valid but may not do this: a publishable key, a live key on an account that is not live yet, or a paused account.

CodeStatusMeaning
secret_key_required403The endpoint needs a secret key (sk_…); publishable keys are refused.
permission_denied403The key lacks the scope this endpoint needs. Reserved for restricted keys (rk_…).
account_not_ready403The merchant account is not set up to take payments.
account_not_live403The organization is not approved for live payments yet; use a test key.
account_paused403Payments are paused for this account.
checkout_challenge_required403The buyer must complete a challenge before paying.
checkout_challenge_invalid403The buyer's challenge response is not valid.

idempotency_error

The Idempotency-Key conflicts with an earlier request. See Idempotency.

CodeStatusMeaning
key_reused422The Idempotency-Key was already used with a different request.
in_progress409A request with this Idempotency-Key is still in progress.
secret_not_replayable409The request with this Idempotency-Key succeeded, but its response held a secret that is never stored. object_id names the object: retrieve it, or rotate its secret.

rate_limit_error

Too many requests. Back off and retry.

CodeStatusMeaning
rate_limited429Too many requests. Reserved; rate limits are not enforced yet.
checkout_rate_limited429Too many checkout attempts from this buyer. Try again later.
checkout_attempt_limit429Too many payment attempts on this checkout.

api_error

A problem on RunePay's side or upstream. A retry with the same Idempotency-Key returns this same stored error and never runs the operation twice; see Idempotency before retrying with a new key.

CodeStatusMeaning
not_configured503The API is not configured on this deployment.
internal500Something went wrong on RunePay's side. Retry with the same Idempotency-Key.
checkout_unavailable503Checkout is temporarily unavailable.
payment_unavailable503The payment could not be processed right now. Try again.
processor_unavailable503The card processor is unavailable. Try again.
risk_screening_unavailable503Risk screening is unavailable, so the payment was not attempted. Try again.
no_test_processor500Test mode has no processor configured.