Click to Pay error handling
Every rejection is a typed error carrying a stable .code . Switch on .code, not on .message.
.type groups codes by who can act on them; .cause (when present) carries extra diagnostic detail for your own logs.
Always keep a generic fallback for codes you don't recognise — this list grows over time. Click to Pay adds error states periodically and new codes may appear without a corresponding SDK release.
{
name: 'ComcardeError',
type: 'CUSTOMER',
code: 'CTP_OTP_INVALCustomer codes
| Code | Suggested UI string value | Reason & Thrown by |
|---|---|---|
| VISA_CTP_OTP_INVALID | That code is incorrect. Please try again or request a new one. | Visa SRC rejected the supplied OTP (cause carries the SRC reason).verifyOtp |
| VISA_CTP_OTP_EXPIRED | That code has expired. Please request a new one. | The OTP code has expired and must be resent.verifyOtp |
| VISA_CTP_OTP_LOCKED | Too many incorrect attempts. Please try again later. | The consumer identity is temporarily locked after too many failed OTP attempts.verifyOtp |
| VISA_CTP_OTP_RATE_LIMITED | Please wait before requesting another code. | OTP resend was rejected because the rate limit has been reached.resendOtp |
Merchant codes
| Code | Suggested UI string value | Reason & Thrown by |
|---|---|---|
| VISA_CTP_NOT_INITIALIZED | Click to Pay is unavailable right now. Please try another payment method. | initializeClickToPay was not called, or it failed before completion.updateAmount, getCards, verifyOtp, resendOtp, processPayment |
| VISA_CTP_INVALID_OPTIONS | Required options are missing or invalid. | initializeClickToPay, updateAmount, getCards, verifyOtp, resendOtp, encryptCard, processPayment |
| VISA_CTP_CARD_NETWORK_NOT_ALLOWED | This card scheme is not supported. Please use a Visa or Mastercard. | A card was offered that does not match the configured allowedCardNetworks.encryptCard, processPayment (ENROLL_AND_CHECKOUT) |
PSP codes
| Code | Suggested UI string value | Reason & Thrown by |
|---|---|---|
| VISA_CTP_PAYMENT_FAILED | Payment failed. Please try a different card. | Visa SRC checkout rejected a CHECKOUT_SAVED_CARD and returned a non-success response.processPayment (CHECKOUT_SAVED_CARD) |
| VISA_CTP_SESSION_FAILED | Failed to create a Click to Pay session. | initializeClickToPay, encryptCard |
| VISA_CTP_LOOKUP_FAILED | Card lookup failed. | getCards, verifyOtp, resendOtp |
| VISA_CTP_ENROLLMENT_FAILED | We couldn't save your card. Your payment was not taken. | Visa SRC enrolment-and-checkout rejected an ENROLL_AND_CHECKOUT and returned a non-success response.processPayment (ENROLL_AND_CHECKOUT) |
| VISA_CTP_CHECKOUT_TIMEOUT | Click to Pay took too long to respond. Please try again. | vSdk.checkout did not resolve within the checkout timeout window of 60 seconds (typically a hung SRC iframe).processPayment |
| VISA_CTP_CHECKOUT_EXCHANGE_FAILED | BR-DGE rejected the Visa checkoutResponse / SUT exchange. | |
| VISA_CTP_SUT_EXCHANGE_FAILED | Failed to exchange a successful checkout for a single use token. Contact support. | BR-DGE's Single Use Token exchange failed after a successful Visa checkout.processPayment |
Network codes
| Code | Suggested UI string value | Reason & Thrown by |
|---|---|---|
| VISA_CTP_DECRYPTION_FAILED | We couldn't retrieve your card details. Please try selecting your card again, or enter your card details manually. | The Visa checkoutResponse credentials could not be extracted (cause: MISSING_CHECKOUT_JWT | INVALID_CHECKOUT_JWT | MISSING_UCTP_CREDENTIALS) |
| CTP_SDK_LOAD_ERROR | Click to Pay is temporarily unavailable. Please try again or choose another payment method. | Failed to load Click to Pay client script.initializeClickToPay |
Updated about 3 hours ago
What’s Next
Did this page help you?
