Skip to content
Meem Payment

Build reliably

Errors and status codes

The HTTP status tells you what kind of outcome you got; the code field tells you exactly which one. Branch on codes, never on human-readable messages.

Response shapes

ShapeWhere
PaymentResponse { paymentId, status, code, normalizedCode, declineCategory, message, redirectUrl, correlationId }Payment operations: success, 402, 409, 502, and business 422s.
ValidationProblemDetails { title, status, detail?, errors, code? }Field validation 422s. errors maps field names to messages; code is present when there's a machine-readable reason.
{ code, message }Checkout sessions, payment links, webhook endpoints, hosted fields and operator headers.
{ error, error_description }POST /api/v1/auth/token (RFC 6749).
{
  "paymentId": "a2d4f6b8-1c3e-4a5b-8d7f-9e0a1b2c3d4e",
  "status": "Declined",
  "code": "INSUFFICIENT_FUNDS",
  "normalizedCode": "INSUFFICIENT_FUNDS",
  "declineCategory": "SoftDecline",
  "message": "<human-readable reason>",
  "redirectUrl": null,
  "correlationId": "5d1e2f3a-4b5c-4d6e-8f9a-0b1c2d3e4f5a"
}

HTTP status codes

StatusMeaningWhat to do
200 · 201 · 202Success, created, accepted.Check status: Requires3DS or RequiresAction needs the customer at redirectUrl.
400Malformed request (e.g. a bad X-Merchant-Context, or an unreadable token request).Fix the request.
401Missing, expired or invalid token or credentials.Get a new token; check credentials.
402Declined by the issuer/PSP, or blocked by a risk rule (RISK_BLOCKED).Show a decline message; offer another method. Don't retry a hard decline.
403Authenticated but not allowed (permission, merchant context, operator credentials).Check the token's scope and headers.
404Unknown resource, or one that belongs to another merchant.Check the id and the credentials you used.
409Conflict: same idempotency key in flight, or the operation doesn't fit the current status.Re-read the resource; retry later with the same key.
410Expired checkout session or unavailable payment link.Create a new session or link.
422Validation or business rule (see codes below).Fix the input or configuration; don't retry unchanged.
429Rate limit exceeded.Wait for Retry-After, then retry.
501Hosted fields outside the sandbox.Use hosted checkout.
502No gateway could process the payment (Failed).Read the payment; retry with a new key only if appropriate.

Payment result codes

CodeHTTPMeaning
RISK_BLOCKED402A risk rule blocked the payment; a risk event is recorded.
ROUTING_BLOCKED402The routing workflow refused the payment (reject or risk-block node).
decline codes, e.g. INSUFFICIENT_FUNDS402Business decline. See normalizedCode and declineCategory.
ROUTING_NOT_CONFIGURED422No active published workflow for this payment.
MERCHANT_GATEWAY_NOT_CONFIGURED422No routable gateway account for this merchant and environment.
payment.environment_indeterminate422environment omitted and it can't be resolved from your accounts.
WORKFLOW_NOT_FOUND · WORKFLOW_NOT_PUBLISHED · WORKFLOW_PAYMENT_METHOD_MISMATCH422The explicit workflowId can't be honoured. It's never substituted.
OPERATION_NOT_SUPPORTED422The selected gateway doesn't support this operation (e.g. purchase, void).
AMOUNT_LIMIT_EXCEEDED422Capture above the authorized amount, or refund above the captured amount.
IDEMPOTENCY_KEY_REUSED422Same Idempotency-Key, different request.
IDEMPOTENCY_IN_PROGRESS409The first request with this key is still running.
STATE_CONFLICT · OPERATION_IN_PROGRESS409Not allowed in the current status, or another operation is in progress.
PAYMENT_NOT_FOUND404Unknown payment or another merchant's payment.
ROUTING_FAILED502No eligible gateway account could process the payment.
PROCESSING_INTERRUPTED502Interrupted before reaching any provider. No charge; retry with a new key.
STATUS_UNKNOWN · REFUND_OUTCOME_UNKNOWN200Provider outcome not yet confirmed (Pending). Wait for the webhook; don't retry.

Validation errors

Field errors come back as 422 ValidationProblemDetails. A reused idempotency key uses the same shape with code set:

{
  "title": "One or more validation errors occurred.",
  "status": 422,
  "detail": "This Idempotency-Key was already used with a different request body. Use a new key for a new request.",
  "code": "IDEMPOTENCY_KEY_REUSED",
  "errors": {}
}
  • amount must be greater than zero.
  • currency is required and must be three letters (ISO 4217).
  • cardToken is required on POST /payments.
  • channel, when sent, must be web, mobile, link, api or recovery.
  • environment, when sent, must be Sandbox or Production.

Documentation reflects the platform as verified on 3 December 2026. Placeholder hosts and credentials are used throughout; your real sandbox host and keys are provided at onboarding.