Integration notes

These behaviours are expected, but they may not be obvious the first time you integrate Click to Pay. Review them before you start testing to avoid common integration issues.

Mastercard behaviour

If a Mastercard sends an OTP, it always comes from a mobile device.

Hosted-fields pan does not reach your merchant page

The card number typed into a hosted-field iframe stays inside the iframe. Calling hostedFields.encryptCard({...}) returns encryptedCard, brand, and lastFour but never the actual digits. This is deliberate and keeps you out of PCI scope for card data.

If you need to display card ending 4242 on a success screen, use lastFour from the encrypt or tokenise response.

cardholderName is read by the merchant page, not the iframe

The cardholder-name input is a plain <input> you render. Read its value when the user clicks Pay and pass it to encryptCard({ session, cardholderName }). The iframe forwards it to the encrypt endpoint as nameOnCard.

amount is a decimal string, never minor units

'10.00', '7.99', '1.50'. Not 1000. Not 7.99 as a number. Click to Pay's
SDK reads it from the session JWT and is strict about the format.

Identity type strings are case-sensitive

'EMAIL_ADDRESS' and 'MOBILE_PHONE_NUMBER', both upper-snake-case. The old value 'MOBILE_NUMBER' is rejected by the pilot SDK with a VISA_CTP_LOOKUP_FAILED error.

The first OTP submission can return PENDING_CONSUMER_IDV

Click to Pay sometimes returns actionCode: 'PENDING_CONSUMER_IDV' on the first getCards call after OTP submission, even when Click to Pay has already accepted the code. The BR-DGE client auto-retries once with the same validation data. verifyOtp resolves successfully after the retry. Seeing two getCards requests on the wire is normal.

Remember-me consent goes on checkout, not OTP verify

The remember this device choice rides on the checkout call as a
complianceSettings resource with complianceType: 'REMEMBER_ME' - never on
verifyOtp / getCards, which the BR-DGE SDK rejects if a remember field is
present. Send REMEMBER_ME only when the consumer ticked the box.

Sessions expire

A Click to Pay session has a finite lifetime. If a consumer abandons mid-flow and comes back hours later, the next call throws VISA_CTP_SESSION_FAILED. Catch it and call initializeClickToPay() again to mint a fresh session.

Sessions are single-use after payment

The Click to Pay SRC session JWT is consumed by processPayment, whether it succeeds or fails. After a payment attempt, getInitStatus().sessionStale is true. The next call to initializeClickToPay() detects this and mints a fresh session automatically. You do not need to handle this explicitly.


Did this page help you?