3‑D Secure Integration Guide

    Three‑Domain Secure (3‑DS) is a fraud prevention protocol that authenticates cardholders before you submit a transaction. It reduces e‑commerce payment fraud and increases customer confidence by sharing additional data between the merchant, card issuer and cardholder. For most transactions this happens behind the scenes, but in some cases customers may be challenged (for example, by entering a one‑time password).

    Overview

    Implementing 3‑D Secure requires Gateway.js. You must first load the Gateway.js script and create a public API key as described in the Gateway.js guide. Once the library is loaded, you can initialise the payer authentication module and then exchange data with the payment gateway. The key steps are summarised below.

    Quick Start Steps

    1. Initialise Gateway.js. Load the script and call Gateway.create() with your public key. The resulting object exposes theget3DSecure() method.
    2. Initialise payer authentication. Callgateway.get3DSecure() to obtain the 3‑DS interface.
    3. Create a transaction interface. Build an object containing details about the transaction, including card number, expiration date, currency, amount, cardholder name, email address and billing address. If you are using Collect.js, replace card details with the payment token; if using a saved customer, provide the customer vault token and amount.
    4. Start the authentication process. Mount the interface onto your page. For single‑page applications built with frameworks like React or Angular, ensure the mounted DOM element isn't destroyed during re‑renders.
    5. Attach callbacks. Register callbacks to handle different events: when the issuer requests a password, when 3‑DS data is ready, when the customer fails authentication, and to capture any errors.
    6. Send 3‑DS data to your backend. When the authentication completes, send the 3‑DS data returned from the callback to your server.
    7. Submit the transaction. Post the 3‑DS data to the payment API along with your private API key to finalise the transaction.

    Additional Notes

    • For frictionless flows, the customer is authenticated automatically and you won't need to show any challenge screen.
    • When using Collect.js, call the 3‑DSconfigure() method after the card details have been collected to provide the tokenised payment data.
    • Customer vault integrations require only the customer vault token, currency and amount. Card details are not included .
    • Always submit the final transaction via the secure payment API with your private key; do not include the private key in client‑side code.