3D Secure

Some payment card transactions require the cardholder to pass a 3D Secure challenge. We provide the means to achieve this in the Job flow.

3D Secure is the generic name for payment card security programmes called:

  • Verified by Visa
  • MasterCard SecureCode
  • American Express SafeKey

When we detect the 3D Secure challenge, the state of the Job changes to awaitingTds. The activeTdsId field of the Job object contains the identifier of an object which represents the 3D Secure process details.

You will need to retrieve a 3d-secure object and display the challenge to your user, so that they can complete the 3D Secure step.

The url from the 3d-secure object is the URL you should display to your user. The content loaded by this URL is the original, unmediated 3D Secure challenge form from the card issuer. It is the same as if your user were completing their transaction themselves.

Present the URL in an <iframe> surrounded by your branding.

// Get 3d-secure object from Automation Cloud
const tds = await AutomationCloud.get3DSecure(tdsId); // => { object, id, url }

// Show 3D Secure form to user
const tdsIframe = document.createElement('iframe');
tdsIframe.setAttribute('src', tds.url);

window.document.getElementById('tds-iframe').appendChild(iframe);

When your user submits the final step on the 3D Secure form, the parent window on your website receives a 3dsecure-finished message.

// Continue after 3D Secure form is completed
window.addEventListener('message', event => {
  if (event.data === '3dsecure-finished') {
    // We are done with 3D Secure!
    console.log('3D Secure form closed.');
  }
});

The following endpoint requires authentication.


Retrieve a 3D Secure challenge

Returns an active 3d-secure object when present, or a 404 error otherwise. Supply the unusual activeTdsId of the job.

Code sample

GET/3d-secure/:id/
curl -X GET 'https://api.automationcloud.net/3d-secure/daab57a8-8617-4521-a403-e9e1a84c79b7/' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: application/json' 

Success Responses

Status 200

{
  "object": "3d-secure",
  "id": "daab57a8-8617-4521-a403-e9e1a84c79b7",
  "url": "https://verify.automationcloud.net/3d-secure/ab58da7a-7168-4125-a403-e9e1a84c79b7/show"
}

👆 Here is an example of a 3d-secure object you get in return.