Skip to content

Error codes ​

You will meet two kinds of errors:

  1. SDK error messages: thrown by the SDK before or after it calls SimplePay.
  2. SimplePay error codes: in the errorCodes array of SimplePay's response. The SDK turns them into a SimplePay API error: <codes> exception (several codes comma-separated, for example SimplePay API error: 5100,5302).
ts
try {
  await startPayment(data)
} catch (error) {
  const match = /SimplePay API error: ([\d,]+)/.exec((error as Error).message)
  const codes = match ? match[1].split(',') : []
  if (codes.includes('5013')) {
    // this orderRef already exists
  }
}

SDK error messages ​

MessageCauseFix
Missing SimplePay configuration for HUFThe currency's SIMPLEPAY_MERCHANT_ID_* or SIMPLEPAY_MERCHANT_KEY_* is not setSet both (Configuration)
Unsupported currency: XYZcurrency is not HUF, HUF_SZEP, EUR or USDUse a supported currency
Missing merchant keyAn empty secret key was used for signingCheck the key variable; for the IPN, the merchantKey argument
SimplePay return url must be absolute https in productionIn production the return URL is missing or not httpsSet SIMPLEPAY_REDIRECT_URL or redirectUrl to https://…
SimplePay return urls must be absolute https in productionIn production an urls entry is missing or not httpsMake all four urls entries https://…
SimplePay API error: 401 (or another HTTP status)SimplePay answered with a non-2xx statusCheck the keys and the sandbox/production setting
Missing response signatureSimplePay's response has no Signature headerOften a wrong endpoint or a proxy; turn on SIMPLEPAY_LOGGER
Invalid response signatureThe response or back-URL signature doesn't matchWrong key (sandbox/live mix-up, another currency), or tampered r/s
Merchant id not found in the environment: …The back URL's merchant ID is in no SIMPLEPAY_MERCHANT_ID_* variableSet that account's merchant ID
Invalid IPN request signatureThe IPN signature doesn't matchRead the raw body, pass the right key (IPN)
Invalid IPN request bodyThe IPN body is not a JSON objectDon't transform the body
Missing Google Pay tokenEmpty googlePayTokenPass the token from the browser
Google Pay does not support HUF_SZEP / Apple Pay does not support HUF_SZEPGoogle/Apple Pay started with the SZÉP currencyUse another currency
Apple Pay domain must be the registered FQDNdomain is not a valid domain namePass the registered FQDN, with no protocol or path
Missing Apple Pay sessionThe startapplepay response has no applePaySessionCheck the domain registration in the SimplePay admin
Invalid Apple Pay transaction idtransactionId is not a positive integerPass the ID from the startApplePay response
Missing Apple Pay tokenThe token is not valid Base64Pass the browser's token unchanged
Apple Pay authorization failedapplePayStatus is not STATUS_SUCCESSThe customer retries, or uses another card
TimeoutErrorSimplePay did not answer within 30 secondsRetry later

3004 with Google Pay

Google Pay 3004 with a redirectUrl is not an error: startGooglePay returns the response and the button redirects to the 3DS page.

Common SimplePay error codes ​

Source: SimplePay – error codes (Hungarian). The descriptions below are short English summaries; the full official list is on that page.

Signature and format ​

CodeMeaningTypical cause with the SDK
5100Invalid signatureWrong key (sandbox key on live or the other way round, another currency's key)
5302, 5303Invalid signature on the incoming requestSame as above
5321Format error / invalid JSONA badly formatted field in the request. For dates (such as recurring.until) use toISO8601DateString.

Merchant ​

CodeMeaningWhat to do
2006Merchant not foundCheck the merchant ID
5010Merchant account not foundSandbox ID on the live API or the other way round
5201Merchant ID missingSet SIMPLEPAY_MERCHANT_ID_*

Order ​

CodeMeaningWhat to do
5013Transaction already existsEvery payment attempt needs a new, unique orderRef
5101, 5213Order reference missingPass orderRef
5102Amount missingPass total
5065Invalid amountCheck the total value
5066Invalid currencyUse the account's currency
5011Transaction not foundCheck the transactionId (for example with cancelCard)
5333Transaction ID missing
5304Call failed because of a timeoutRetry

Card and 3DS ​

These concern the customer's card. They show up as a FAIL event on the back URL, or as an exception for token charges.

CodeMeaningWhat to tell the customer
2063, 2066, 2004Declined by the issuing bankAsk your bank, or pay with another card
2013Balance or daily limitCheck your balance and limits
2070Card type not enabled or not recognisedUse another card
2071Wrong card numberCheck the card number
2072Wrong expiry dateCheck the expiry date
2073Wrong CVCCheck the code on the back
3004The bank asks for strong customer authentication (3DS)Retry and follow your bank's authentication steps

Recurring payments ​

CodeMeaningWhat to do
5044Recurring payments not enabledAsk SimplePay to enable them for the account
5040Stored card not foundThe card was removed; a new registration is needed
5041Stored card expiredA new card registration is needed
5081Recurring token not foundWrong or already deleted token

General ​

CodeMeaning
0Success
999, 5000General error – retry; if it persists, contact SimplePay support

Unofficial community SDK. Not affiliated with or endorsed by SimplePay Zrt. MIT License.