Skip to main content

Test Your Click to Pay Drop-In UI Configuration


This section contains information about testing your Click to Pay Drop-In UI configuration.

This tutorial assumes you have already completed setup and have your Click to Pay Drop-In UI capture context and SDK configured. For initial setup steps, see Get Started with Click to Pay Drop-In UI.

Test Payment Details

Use these test card numbers to test your Click to Pay Drop-In UI configuration.

Combine the BIN with the card number when sending to Click to Pay Drop-In UI.

Visa Click to Pay Drop-In UI Test Cards

These Visa test cards can be added to your Click to Pay Drop-In UI wallet.

Replace the X in the card number with 4.

You can manage your Visa Click to Pay Drop-In UI test cards and account here:

To manage Visa test cards for customer authentication, contact your implementation consultant or technical account manager.

This table lists the Visa test card numbers:

Card NumberExpiration DateCVV
x6229x312312375512/2029728
x6229x312312376312/2029605
x6229x312312377112/2029694
x6229x312312378912/2029881
x6229x312312379712/2029678
x6229x312312380512/2029084
x6229x312312381312/2029127
x6229x312312382112/2029218
x6229x312312383912/2029114
x6229x31231238x712/2029867
x6229x312312385x12/2029301

These Visa test card numbers can be used to test ECI05 frictionless authentication. Replace the X in the card number with 4:

Card NumberExpiration DateCVV
X6229X312311372312/2027929
X6229X312311373112/2027217

These Visa test card numbers can be used to enroll in Passkey Service. Replace the X in the card number with 4:

Card NumberExpiration DateCVV
X3958X032780011012/2027832
X3958X032830011012/2027474

Mastercard Test Cards

Mastercard test cards can be added to your Click to Pay Drop-In UI wallet. You must retrieve Mastercard test cards from their Click to Pay Drop-In UI test page: Mastercard test cards.

For Mastercard Click to Pay Drop-In UI, a Mastercard window opens and prompts you to enter additional information.

Mastercard has different test cards for retrieving tokenized and non-tokenized data. recommends using these test cards:

  • Test cards to retrieve PAN data: use these cards when the customer is completing checkout as a one-time guest and does not have a Click to Pay Drop-In UI account or want to create one.
  • Test cards to retrieve token data: use these cards for tokenized Click to Pay Drop-In UI transactions.
  • Test cards eligible for tokenization: use these test cards to attempt Click to Pay Drop-In UI authentication when Click to Pay Drop-In UI authentication is enabled.

You can manage your Mastercard Click to Pay Drop-In UI test cards and account here:

Mastercard authentication test cards are available on the Mastercard Checkout Solutions page in the Mastercard Developer Center.

Error Handling

The Unified Checkout SDK uses a structured error object for all error scenarios. The SDK returns errors as exceptions from asynchronous methods and also returns them as events for centralized handling.

UnifiedCheckoutError

All SDK errors are instances of UnifiedCheckoutError with these properties:

PropertyTypeDescription
correlationIdstring?The correlation ID from an underlying request, when applicable.
detailsunknown?Additional error-specific information. This is often an array of objects.
informationLinkstring?The URL linked to the online documentation for this error.
messagestringA human-readable description of the error.
namestringThe value is always "UnifiedCheckoutError".
reasonstringA machine-readable error code, such as "CAPTURE_CONTEXT_INVALID".

Detecting Errors

Errors might be serialized through postMessage. recommends using the name property instead of instanceof:

try {  const result = await checkout.mount('#buttons');} catch (error) {  if (error.name === 'UnifiedCheckoutError') {    // Access error.reason, error.message, error.details  }}

A helper function can also be written for reuse:

function isUnifiedCheckoutError(obj) {  return (    obj !== null &&    typeof obj === 'object' &&    obj.name === 'UnifiedCheckoutError' &&    typeof obj.reason === 'string' &&    typeof obj.message === 'string'  );}

Error Handling Patterns

Try/Catch

try {  const client = await VAS.UnifiedCheckout(sessionJWT);  const checkout = await client.createCheckout();  const result = await checkout.mount('#buttons');} catch (error) {  console.error(error.reason, error.message);}

Promise .catch()

VAS.UnifiedCheckout(sessionJWT)  .then(client => client.createCheckout())  .then(checkout => checkout.mount('#buttons'))  .catch(error => console.error(error.reason, error.message));

Centralized Error Logging Using Events

Errors from all integrations are also emitted at the client level. The client.on('error') event supports centralized logging:

const client = await VAS.UnifiedCheckout(sessionJWT);client.on('error', (err) => {  errorReporter.send({    source: err.source,   // "checkout", "trigger", "button", or "client"    code: err.code,    message: err.message  });});

recommends this approach because it catches errors from all checkouts, triggers, and buttons created from this client instance.

Error Codes

Initialization Errors

These errors are returned during VAS.UnifiedCheckout(sessionJWT):

ReasonDescription
CAPTURE_CONTEXT_EXPIREDThe supplied JWT has expired. Generate a new session.
CAPTURE_CONTEXT_INVALIDThe session JWT is not valid. For example, it has a bad signature or is malformed.
UNUSED_TARGET_ORIGINSOne or more targetOrigins in the session do not match the current page origin. The details array lists the unused origins.

Mount Errors

These errors are returned during checkout.mount() or trigger.mount():

ReasonDescription
CHECKOUT_ALREADY_MOUNTEDThe checkout or trigger is already mounted. Call unmount() first, or create a new instance.
MOUNT_CONTAINER_SELECTORThe CSS selector does not match any Document Object Model (DOM) element. Check that the container exists before calling mount().
MOUNT_ERRORA problem occurred loading the payment iframe.
MOUNT_INVALID_CONTAINERThe supplied container parameter is not a valid CSS selector string or HTMLElement.
MOUNT_PAYMENT_TIMEOUTA payment method timed out during initialization.
MOUNT_PAYMENT_UNAVAILABLENo payment types could be presented to the customer. This might be due to browser or device support, or errors during checkout initialization.
MOUNT_SIDEBAR_OPTIONSThe supplied container parameter is invalid for sidebar mode.
MOUNT_TOKEN_TIMEOUTToken creation timed out during mount. This might indicate a network issue.
MOUNT_TOKEN_XHR_ERRORA network error occurred during token creation. Check the customer's connectivity.

Checkout Errors

This table lists the reason values returned during checkout:

ReasonDescription
CHECKOUT_ERRORA general checkout error occurred.
CHECKOUT_PAYMENT_PARAMETERSOne or more payment parameters have a validation error.
CHECKOUT_VALIDATION_PARAMSOne or more checkout parameters have a validation error.

Trigger Errors

This table lists the reason value returned for a trigger operation error:

ReasonDescription
TRIGGER_PAYMENT_TYPE_NOT_SUPPORTEDThe specified payment type cannot be used with a trigger. Only PANENTRY and CLICKTOPAY values are supported.

Payment-Specific Errors

This table lists reason values for payment-specific errors:

ReasonDescription
CLICK_TO_PAY_SDK_LOAD_ERRORThe Click to Pay SDK failed to load.
ENCRYPT_CARD_FOR_SRC_ENROLMENT_ERRORCard encryption for Click to Pay enrollment failed.
GOOGLEPAY_CHECKOUT_ERRORA Google Pay checkout error occurred.
LAUNCH_SRC_CHECKOUT_ERRORLaunching the Click to Pay checkout failed.
TRIGGER_PAYMENT_TYPE_NOT_SUPPORTEDThe payment type is not supported for triggers.

General Errors

This table lists the reason code returned for an unspecified error:

Reason CodeDescription
UNKNOWN_ERRORAn unknown error has occurred.

Last published: September 29, 2026