Response & Decline Codes

The HTTP, decline and status codes the API returns, and what to do about each.

Reference for the codes the Tonder API returns: HTTP codes, card decline codes, and withdrawal status codes.

HTTP codes

Success

CodeStatusDescription
200OKThe request was successful. Typical for GET requests.
201CreatedThe resource was created successfully. Typical for POST requests.
202AcceptedThe request was accepted but isn't yet complete (e.g. a payment requiring 3DS).
204No ContentThe request was successful but there's no content to return (e.g. a DELETE).

Client errors

CodeStatusDescriptionAction
400Bad RequestMalformed request or missing required parameters.Check the body and parameters.
401UnauthorizedAuthentication failed: invalid or missing API key.Check your key and that it carries the Token prefix (with a space).
402Payment RequiredThe processor or issuing bank declined the payment.Advise the user to try another method.
404Not FoundThe requested resource doesn't exist.Check the transaction ID or URL.
422Unprocessable EntityWell-formed request with semantic errors (e.g. invalid email, amount out of range).Fix the indicated fields.
429Too Many RequestsYou exceeded the rate limit.Retry after a delay (exponential backoff).

Server errors

CodeStatusDescriptionAction
500Internal Server ErrorAn unexpected error on Tonder's servers.Retry after a short delay.
502Bad GatewayA dependent service is temporarily down.Retry after a short delay.
503Service UnavailableThe API is temporarily unavailable (e.g. maintenance).Retry later. Check the status page.

Error format

{
  "error": {
    "code": "validation_error",
    "message": "Amount must be greater than 0",
    "type": "request_error",
    "details": { "field": "amount", "received_value": -10.00 }
  },
  "request_id": "req_abc123"
}

The error object contains code (machine-readable), message (human-readable), type (category), details (additional context). The request_id identifies the request — include it when contacting support.

Card decline codes

A standardized internal decline-code system to unify error handling across providers. Format: [Category][Type][Sequence] — category (letter A-Z), type H (hard decline, permanent) or S (soft decline, retry allowed), sequence (two digits).

The detailed catalog of the raw processor codes (numeric, alphanumeric, and K codes) is in Decline codes.

A — Authentication & Security

CodeTypeDescription
AH01HardInvalid card number
AH02HardInvalid CVV/CVC
AH03HardInvalid expiry date
AH04Hard3D Secure authentication failed
AH05HardFraudulent transaction detected
AH06HardCard reported lost
AH07HardCard reported stolen
AH08HardSuspicious behavior detected
AS01Soft3D Secure authentication required
AS02SoftStrong customer authentication (SCA) required

B — Bank/Issuer

CodeTypeDescription
BH01HardCard declined by bank
BH02HardCard expired
BH03HardCard canceled/disabled
BH04HardCard restricted
BH05HardBank authorization required
BH06HardCard blacklisted
BH07HardInvalid account
BH08HardBank requested card retention
BS01SoftBank temporarily unavailable
BS02SoftIssuer system maintenance

C — Credit/Funds

CodeTypeDescription
CH01HardInsufficient funds
CH02HardCredit limit exceeded
CH03HardOver limit
CH04HardWithdrawal limit exceeded
CH05HardTransaction limit exceeded
CS01SoftTemporary credit hold

D — Data/Configuration

CodeTypeDescription
DH01HardInvalid merchant configuration
DH02HardCurrency not supported
DH03HardCard type not supported
DH04HardInvalid amount
DH05HardTransaction type not permitted
DH06HardInvalid transaction data
DS01SoftValidation error — retry allowed
DS02SoftConfiguration temporarily unavailable

E — External/Network

CodeTypeDescription
ES01SoftNetwork timeout
ES02SoftCommunication error
ES03SoftProcessor unavailable
ES04SoftGateway timeout
ES05SoftExternal service error

F — Fraud Prevention

CodeTypeDescription
FH01HardHigh risk transaction blocked
FH02HardVelocity rules violated
FH03HardGeographic restrictions
FH04HardMerchant blacklist match
FH05HardCard blocked for fraud
FS01SoftTransaction under fraud review

G — General/System

CodeTypeDescription
GS01SoftGeneral system error
GS02SoftProcessing error — retry allowed
GS03SoftDuplicate transaction
GS04SoftTransaction expired
GS05SoftService temporarily unavailable

U — User/Customer

CodeTypeDescription
UH01HardTransaction canceled by customer
UH02HardCustomer authentication failed
UH03HardCustomer verification failed
US01SoftCustomer action required
US02SoftSession timeout

The decline code arrives in the webhook in the decline_code and decline_reason fields:

{
  "status": "Declined",
  "decline_code": "BH01",
  "decline_reason": "Card declined by bank",
  "event_type": "payment_Declined"
}

Withdrawal status codes

PendingProcessingSuccess (terminal success), or Declined / Cancelled / Failed (terminal failure). See the full transitions and the mapping from the previous names in Withdrawal status workflow.

Next steps

Was this page helpful?

On this page