Menu

3DS Flex - Worldpay with Cardinal

3DS Flexis the most advanced product on the market for 3-D Secure (3DS). It combines the new standard of 3DS2 with traditional 3DS allowing for a single integration.

This guide allows you to integrate to Cardinal through Worldpay. Use Cardinal's own JavaScript for Device Data Collect and Challenge pages, as well as making use of Cardinal's own test system. You must have a Secure Test Cardinal profile before you can use this method of integration. For more information, contact your Implementation Manager.

Note:

  • You must be setup for 3DS Flex and the Secure Test connection to Cardinal, before using it. For more information, contact your Relationship Manager or Implementation Manager.
  • This guide is updated as new features are released.

How Worldpay provides 3DS2

Worldpay's relationship with Cardinal Commerce leverages their 3DS2 authentication service for Device Data Collection (DDC) and challenge flows. The rest of the process is managed by Worldpay.

3DS2 flow

Flow

Device Data Collection (DDC)

Device Data Collection gathers specific shopper device information to support authentication.

  1. Create a JSON Web Token (JWT) on your server that is passed to the browser. When the shopper has entered a card number, start the Device Data Collection (DDC).
  2. Include a hidden DDC iframe, with the DDC JWT and the shopper's card number, on your page.
  3. Post the form to Cardinal Commerce's DDC endpoint.
  4. You receive a notification (on the shopper's browser) that DDC is complete. DDC returns a JavaScript message event, containing a SessionId.

Initial Payment Request

  1. Take the SessionId returned from the Device Data Collection, and submit it as the dfReferenceId in your XML payment request.
  2. An authentication request is submitted to Cardinal Commerce to determine if a challenge is required. The possible outcomes are:
    • Frictionless Flow - An authorisation is attempted (Proceed to Step 2 inSecond Payment Request).
    • Challenge Required - Proceed to 3DS2 Challenge

Payment requests with JavaScript not enabled

When a payment request is sent from a browser that cannot run JavaScript,DDCcannot be performed. Without DDC, 3DS2 cannot be automatically performed. To initiate 3DS2 you must add the attribute javascriptEnabled="false" within the element"additional3DSData"

You must also add the child element <browserLanguage> to your payment request. This additional information is included in the request for 3DS2 authentication:

Copied!
<shopper>
  <shopperEmailAddress>a.shopper@worldpay.com</shopperEmailAddress>
  <browser>
    <acceptHeader>text/html</acceptHeader>
    <userAgentHeader>Mozilla/5.0…</userAgentHeader>
    <browserLanguage>en-GB</browserLanguage>
  </browser>
</shopper>

3DS2 logic

JavaScript not enabled

IfDDCis successful but you have indicated JavaScript is not enabled, an error message is returned. Your payment request is then submitted with 3DS2 default values.

3DS2 Challenge

  1. Extract the data from the challenge response.
  2. Create a challenge JWT on your server that is passed to the browser. Include a ReturnUrl and the specified values returned in the XML challenge response.
  3. Include a challenge iframe, with the challenge JWT and the optional merchant data (MD), on your page.
  4. Automatically submit this form to the Cardinal Commerce endpoint.
  5. The shopper completes the challenge in the iframe and is redirected to the ReturnUrl.

Second Payment Request

  1. Submit a second XML request, including the shopper session id and machine cookie from the initial XML request.
  2. If authentication is successful, Worldpay attempts authorisation.

JWT creation

All requests to Cardinal Commerce from the shopper's browser must be authenticated using a JSON Web Token (JWT). Providing this gives the shopper's browser access to resources to complete DDC and Challenges. You must create all JWT's on your server and not in the browser. This is because the JWT MAC Key used in JWT creation must only be known to you, Worldpay and Cardinal Commerce.

Best practice: We strongly recommend that you use a third-party library to create the JWT in its entirety.

JWT structure

JWT's consist of three parts (Header, Body and MAC). They are described below:

Header

The purpose of the header is to identify that the body is a JWT and to specify the message authentication algorithm. This is used to create the Message Authentication Code (MAC). The following algorithms are supported:

  • HS256 (HMAC with SHA256)
  • HS512 (HMAC with SHA512)

Example Header:

Copied!
{
  "typ":"JWT",
  "alg":"HS256"
}

Body

A JSON object that contains the claims (name-value pairs) being sent from one party to another. The body must only contain the claims below, adding additional claims results in 400 Bad Request response.

Claim NameM/ODescription
jtiMJWT Id - A unique identifier for this JWT. This field must be set to a random UUID each time a JWT is generated.
iatMIssued At - The epoch time (in seconds - 10 digits) of when the JWT was generated. Valid for two hours.
issMIssuer - An identifier for who is issuing the JWT. Once boarded to Cardinal in Secure Test, you can find these details in the Test version of the MAI. You'll need to use the Production credentails for Production.
expOExpiration - The numeric epoch time (in seconds - 10 digits) that the JWT should be considered expired. Anything over two hours in the future is ignored.
OrgUnitIdMOrganisational Unit Id - An identity associated with your account. Once boarded to Cardinal in Secure Test, you can find this in the Test version of the MAI. You'll need to use the Production credentails for Production.

Example Body:

Copied!
{
  "jti": "69adc185-1748-4525-9ef9-43f259a1c2d6",
  "iat": 1548838855,
  "iss": "5bd9e0e4444dce153428c940",
  "exp": 1548838900,
  "OrgUnitId": "5bd9b55e4444761ac0af1c80"
}

MAC

A base64url encoded hash value of the header and payload combined with a JWT MAC Key. This is used to verify that the contents of the JWT have not been tampered with. Authentication codes are verified by the consumer by recreating the MAC from the JWT header, body and JWT MAC Key.

AttributeDescription
JWT MAC KeyPass this as a string and not a number. Once boarded to Cardinal in Secure Test, you can find this in the Test version of the MAI. You'll need to use the Production credentails for Production

DDC initiation

DDC requires you to change your website to run JavaScript from Cardinal Commerce on your page. The JavaScript runs on the shopper's browser to collect device data as part of the authentication process regardless whether 3DS1 or 3DS2 is used.

Place an invisible iframe on your page. Create a form in the iframe using the POST method with action="https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect". Include the field JWT and Bin as described below. Do not submit this form until the card can no longer be changed.

FieldDescription
JWTThe authentication token, as describedabove.
BinThe card number (PAN). Minimum of first six digits. Fortokenisationuse the value of <bin>

Here's an example of one way to do it:

Copied!
<iframe height="1" width="1" style="display: none;">
  <!-- This is a Cardinal Commerce URL in live. -->
  <form id="collectionForm" method="POST" action="https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect">
    <input type="hidden" name="Bin" value="4000000000001000" />
    <input type="hidden" name="JWT" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OWFkYzE4NS0xNzQ4LTQ1MjUtOWVmOS00M2YyNTlhMWMyZDYiLCJpYXQiOjE1NDg4Mzg4NTUsImlzcyI6IjViZDllMGU0NDQ0ZGNlMTUzNDI4Yzk0MCIsIk9yZ1VuaXRJZCI6IjViZDliNTVlNDQ0NDc2MWFjMGFmMWM4MCJ9.qTyYn4rItMMNdnh6ouqW6ZmcCNzaG9JI_GdWGIaq6rY" />
  </form>
  <script>
    window.onload = function() {
      document.getElementById('collectionForm').submit();
    }
  </script>
</iframe>

DDC Outcome

You are notified via a JavaScript postMessage that DDC has been completed. Your website must listen for this notification which contains the following fields:

NameValue
MessageTypeprofile.completed
SessionIdUUID, not present or undefined
Statustrue or false

There are three possible scenarios:

StatusAction
trueSend SessionId as dfReferenceId in initial payment request.
falseSessionId is empty. Either retry DDC or send empty dfReferenceId. This downgrades authentication to 3DS1.
No callbackEither retry DDC or send empty dfReferenceId. This downgrades authentication to 3DS1.

Example postMessage:

Copied!
{
    "MessageType": "profile.completed",
    "SessionId": "d3197c02-6f63-4ab2-801c-83633d097e32",
    "Status": true
}

Here's some example JavaScript code for reference:

Copied!
window.addEventListener("message", function(event) {
   //This is a Cardinal Commerce URL in live.
   if (event.origin === "https://centinelapistag.cardinalcommerce.com/") {
       var data = JSON.parse(event.data);
       console.warn('Merchant received a message:', data);
       if (data !== undefined && data.Status) {
           // Extract the value of SessionId for onward processing.
       }
   }
}, false);

Extract the SessionId, if returned, and retain it for use in your initial payment request.

Initial XML Payment Request

Create theXML authorisation request. Submit all available information to increase the chance of a frictionless flow and higher authorisation rate.

Note: We recommend providing an orderCode of less than 50 characters for 3DS Flex requests. Where the orderCode is longer than 50 characters, we will truncate it for downstream processing. This adjusted orderCode is only be used in Cardinal's systems.
This doesn't impact the orderCode that is stored internally, the orderCode that is returned to you, or the orderCode that is visible in the Merchant Admin Interface (MAI).

  1. Address data (Mandatory)
  2. additional3DSData (Mandatory)
  3. riskData (Recommended to increase chances of a frictionless flow)

1. Address Data

Submit the <cardAddress> or <billingAddress> element. We recommend you send this, as this is required by the schemes.

Submit the <shippingAddress> element in your request if you want to submit the shopper's delivery address.


<cardAddress>,<billingAddress> and <shippingAddress> contain:

ElementM/C/ODescription
<cardHolderName>MandatoryAccount holder name on card or account
<address1>ConditionalBilling contact Address line 1 .
Optional unless <city> is supplied
<address2>OptionalBilling contact Address line 2
<address3>OptionalBilling contact Address line 3
<postalCode>MandatoryBilling contact ZIP / Postal Code.
Example “CB4 0WE”
<city>ConditionalBilling contact City .
Optional unless <address1> is supplied
<state>OptionalState should only be populated when Billing or Shipping address is domiciled within the United States. In this case the value is two-characters long as defined in the country subdivision code within the ISO-3611-2 specification. (Note: Only provide the two characters after “US-“ e.g. “FL” for Florida)
<countryCode>MandatoryBilling contact ISO-3166 Country Code. Must be upper case.
Example “GB”.
For details, seeISO Country Codes

Submit the shopper's details:

ElementM/C/ODescription
<shopperEmailAddress>MandatoryShopper's email address
<shopperIPAddress>MandatoryShopper's IP address

2. Specifying Additional 3DS Data

There are three attributes inside <additional3DSData>:

AttributesM/ODescription
dfReferenceIdMandatoryThe SessionId returned in the Javascript postMessage after DDC is complete.
If provided empty, the transaction will be downgraded to 3DS1.
challengePreferenceOptionalPossible Values:
  • noPreference (default) - You have no preference whether a challenge should be performed.
  • noChallengeRequested - You prefer that no challenge should be performed.
  • challengeRequested - You prefer that a challenge should be performed.
  • challengeMandated - There are local or regional mandates that mean that a challenge must be performed.

Note: The interpretation of this field varies from issuer to issuer, so Worldpay cannot guarantee any particular behaviour on their part as a result of you setting this field.

challengeWindowSizeOptionalChallenge Window size the issuer should use to display the challenge. Possible Values:
  • fullPage
  • 250x400
  • 390x400 (default)
  • 500x600
  • 600x400

3. Adding Risk Data

Provide additional information in the <riskData> element to increase the chances that the shopper won't be challenged. <riskData> contains three child elements:

Complete Initial Payment Request XML Example

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//Worldpay//DTD Worldpay PaymentService v1//EN"
  "http://dtd.worldpay.com/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
  <submit>
    <order orderCode="YOUR_ORDER_CODE"> 
      <description>YOUR DESCRIPTION</description>
      <amount value="2000" currencyCode="EUR" exponent="2"/>
      <orderContent>
        <![CDATA[]]>
      </orderContent>
      <paymentDetails>
        <CARD-SSL>
          <cardNumber>4000000000000002</cardNumber> <!-- Use a Cardinal PAN for the Secure Test connection to Cardinal -->
          <expiryDate>
            <date month="01" year="2020"/>
          </expiryDate>
          <cardHolderName>AUTHORISED</cardHolderName> <!-- Supply either AUTHORISED or REFUSED -->
          <cvc>123</cvc>
          <cardAddress>
            <address>
              <address1>Worldpay</address1>
              <address2>270-289 The Science Park</address2>
              <address3>Milton Road</address3>
              <postalCode>CB4 0WE</postalCode>
              <city>Cambridge</city>
              <countryCode>GB</countryCode>
            </address>
          </cardAddress>
        </CARD-SSL>
        <session shopperIPAddress="127.0.0.1" id="SESSION_ID"/> <!--Session id must be unique -->
      </paymentDetails>
      <shopper>
        <shopperEmailAddress>jshopper@myprovider.com</shopperEmailAddress>
        <browser>
          <acceptHeader>text/html</acceptHeader>
          <userAgentHeader>Mozilla/5.0 ...</userAgentHeader>
        </browser>
      </shopper>
      <!-- Optional Risk Data -->
      <riskData>
        <authenticationRiskData authenticationMethod="localAccount">
          <authenticationTimestamp><date second="01" minute="02" hour="03" dayOfMonth="01" month="06" year="2019"/></authenticationTimestamp>
        </authenticationRiskData>
        <shopperAccountRiskData
          transactionsAttemptedLastDay="1"
          transactionsAttemptedLastYear="100"
          purchasesCompletedLastSixMonths="50"
          addCardAttemptsLastDay="1"
          previousSuspiciousActivity="true"
          shippingNameMatchesAccountName="true"
          shopperAccountAgeIndicator="lessThanThirtyDays"
          shopperAccountChangeIndicator="lessThanThirtyDays"
          shopperAccountPasswordChangeIndicator="noChange"
          shopperAccountShippingAddressUsageIndicator="thisTransaction"
          shopperAccountPaymentAccountIndicator="lessThanThirtyDays">          
          <shopperAccountCreationDate><date dayOfMonth="01" month="02" year="2003"/></shopperAccountCreationDate>
          <shopperAccountModificationDate><date dayOfMonth="02" month="03" year="2004"/></shopperAccountModificationDate>
          <shopperAccountPasswordChangeDate><date dayOfMonth="03" month="04" year="2005"/></shopperAccountPasswordChangeDate>
          <shopperAccountShippingAddressFirstUseDate><date dayOfMonth="04" month="05" year="2006"/></shopperAccountShippingAddressFirstUseDate> 
          <shopperAccountPaymentAccountFirstUseDate><date dayOfMonth="05" month="06" year="2007"/></shopperAccountPaymentAccountFirstUseDate>
        </shopperAccountRiskData>
        <transactionRiskData
          shippingMethod="shipToBillingAddress"
          deliveryTimeframe="overnightShipping"
          deliveryEmailAddress="sp@worldpay.com"
          reorderingPreviousPurchases="true"
          preOrderPurchase="false"
          giftCardCount="1">
        <transactionRiskDataGiftCardAmount><amount value="1" currencyCode="EUR" exponent="2"/></transactionRiskDataGiftCardAmount>
          <transactionRiskDataPreOrderDate><date dayOfMonth="06" month="07" year="2008"/></transactionRiskDataPreOrderDate>
        </transactionRiskData>
      </riskData>
      <!-- Additional 3DS data that you must provide to us -->
      <additional3DSData
        dfReferenceId="1f1154b7-620d-4654-801b-893b5bb22db1"
        challengeWindowSize="390x400"
        challengePreference="challengeMandated"/>
    </order>
  </submit>
</paymentService>

Warning: If you are not setup for 3DS Flex, you receive an error code "13 - merchant not setup in live" in your response. Contact your Relationship Manager to be enabled for 3DS Flex.

We pass the information to Cardinal Commerce, who match the DDC to the payment request using the dfReferenceId value. This information is sent to the issuer who then establishes whether the payment requires additional authentication (i.e. a challenge) or not.

The response to your authorisation request is either a standardauthorisation responsewhich ends the payment flow or a 3DS challenge response.

3DS Challenge

If the issuer decides that the payment requires additional authentication, they signal to Worldpay that a challenge is required. You'll receive a response from us to redirect the shopper to a challenge page. The 3DS related information is inside the threeDSChallengeDetails element. The child elements of these are as follows:

Field nameDescriptionFormat
acsURLURL of the Issuer's Access Control System (ACS) challenge page. Pass it in the challenge JWT as Payload.ACSUrlURL
transactionId3DSThe MPI's identity of the transaction. Add this to the challenge JWT as Payload.TransactionIdString
threeDSVersionTells you whether a 3DS1 or 3DS2 flow is taken. This could affect what you do next in your integrationPossible Values:
  • 1.0.2
  • 2.1.0
  • 2.2.0
payloadThis contains the information needed to initiate the Challenge. Add this to the Challenge JWT as Payload.PayloadBase64 encoded binary object

Example response with payload:

Copied!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN"
      "http://dtd.worldpay.com/paymentService v1.dtd">
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
	<reply>
		<orderStatus orderCode='YOUR_ORDER_CODE'>
			<challengeRequired>
				<threeDSChallengeDetails>
					<threeDSVersion>2.1.0</threeDSVersion>
					<transactionId3DS>rUT8fLKDviHXr8aUn3l1</transactionId3DS>
					<acsURL><![CDATA[https://merchantacsstag.cardinalcommerce.com/MerchantACSWeb/...]]></acsURL> <!-- This will be a longer URL in test -->
					<payload>P.25de9db33221a55eedc6ac352b927a8c3a08d747643c592dd8f8ab7d3...</payload>
				</threeDSChallengeDetails>
			</challengeRequired>
		</orderStatus>
	</reply>
</paymentService>

Extract information from the XML response and pass it back to the shopper browser to redirect the shopper to complete the authentication.

Warning: When we reply, your system must also extract the machine cookie passed back in the HTTP header of this reply message. You must then return the corresponding cookie in the HTTP header of the second order message.

The cookie you return is slightly different from the cookie in our reply. For example:

  • If we send the cookie as: Set-Cookie: machine=0aa20016;path=/
  • Return the cookie in the HTTP header as: Cookie: machine=0aa20016;path=/

Redirect to 3DS2 Challenge

As the redirect to challenge is another Cardinal Commerce page, you must create a challenge JWT on your server that is passed to the browser. Refer toJWT creationif you need to.

The Challenge JWT contains more fields than the DDC one:

Claim NameDescription
jtiJWT Id - A unique identifier for this JWT. This field must be set to a random UUID each time a JWT is generated
iatIssued At - The epoch time (in seconds - 10 digits) of when the JWT was generated. Valid for 2 hours
issIssuer - An identifier of who is issuing the JWT. Once boarded to Cardinal in Secure Test, you can find these details in the Test version of the MAI. You'll need to use the Production credentails for Production
OrgUnitIdOrganisational Unit Id is an identity associated with your account. Once boarded to Cardinal in Secure Test, you can find these details in the Test version of the MAI. You'll need to use the Production credentails for Production
ReturnUrlThe URL on your website that is invoked when the challenge is complete, see below
PayloadJSON container for extra data required for a challenge
Payload.ACSUrlThe value of the <acsURL> element from the challengeRequired response
Payload.PayloadThe value of the <payload> element from the challengeRequired response
Payload.TransactionIdThe value of the <transactionId3DS> element from the challengeRequired response
ObjectifyPayloadSee below

Here's a full example of a challenge JWT:

Copied!
{
    "jti": "54438b3a-bb53-12cd-8643-1536be73ff35",
    "iat": 3856729482,
    "iss": "5bd9e0e4444dce153428c940",
    "OrgUnitId": "5bd9b55e4444761ac0af1c80",
    "ReturnUrl": "https://merchant.example.com/threedschallengecomplete",
    "Payload": {
        "ACSUrl": "https://merchantacsstag.cardinalcommerce.com/MerchantACSWeb/...",
        "Payload": "P.25de9db33221a55eedc6ac352b927a8c3a08d747643c592dd8f8ab7d3...",
        "TransactionId": "sRMPWCQoQrEiVxehTnu0"
    },
    "ObjectifyPayload": true
}

Request Challenge Page

Create an iframe with an automatic form post to https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp, on the page you redirect the shopper to. This is required unless you have supplied a challengeWindowSize of "fullPage". The size of the iframe depends on threeDSVersion:

  • For threeDSVersion value of 1, the size must be 390x400.
  • For threeDSVersion value of 2, match the value of challengeWindowSize supplied in the authenticate request. For more details of the support challenge windows sizes seehere.

Example 3DS2 challenge iframe:

Copied!
<iframe height="250" width="400">
  <!-- This is a Cardinal Commerce URL in live -->
  <form id= "challengeForm" method= "POST" action="https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp">
    <input type="hidden" name="JWT" value= "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1NDQzOGIzYS1iYjUzLTEyY2QtODY0My0xNTM2YmU3M2ZmMzUiLCJpYXQiOiIzODU2NzI5NDgyIiwiaXNzIjoiNWJkOWUwZTQ0NDRkY2UxNTM0MjhjOTQwIiwiT3JnVW5pdElkIjoiNWJkOWI1NWU0NDQ0NzYxYWMwYWYxYzgwIiwiUmV0dXJuVXJsIjoiaHR0cDovL21lcmNoYW50LmV4YW1wbGUuY29tL3RocmVlZHNjaGFsbGVuZ2Vjb21wbGV0ZSIsIlBheWxvYWQiOnsiQUNTVXJsIjoiaHR0cHM6Ly9hY3MuZXhhbXBsZS5jb20vM2RzMi9jaGFsbGVuZ2U_aWQ9MTIzNDU2Nzg5IiwiUGF5bG9hZCI6IlZHaHBjeUJwY3lCaElHSmhjMlVnTmpRZ1pXNWpiMlJsWkNCbGVHRnRjR3hsSUc5bUlHRWdNMFJUSUNKd1lYbHNiMkZrSWc9PSIsIlRyYW5zYWN0aW9uSWQiOiJzUk1QV0NRb1FyRWlWeGVoVG51MCJ9LCJPYmplY3RpZnlQYXlsb2FkIjp0cnVlfQ.3Dqjr5MuEC9AG7uvsJCft94-d70NmgR94zIeru8fAYE" />
    <input type="hidden" name="MD" value="1234567890" />
  </form>
  <script>
    window.onload = function() {
      // Auto submit form on page load
      document.getElementById('challengeForm').submit();
    }
  </script>
</iframe>
FieldM/ODescription
actionMandatoryWorldpay provides a static Challenge URL when you go live. The test value is: https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp.
JWTMandatoryThe challenge JWT that you generated on the server side.
MDOptionalMerchant Data. This is returned as a parameter to the ReturnUrl.

Once authentication is complete the shopper is redirected to the ReturnUrl which contains the following POST parameters:

  • ReturnUrl
  • Response
  • MD

Second XML Payment Request

Use this request for the ReturnUrl to trigger the second XML Payment Request (remember to also set the machine cookie on the Cookie HTTP header):

After a challenge the info3DSecure element must take a single empty child element named completedAuthentication.

Note: The session id provided in the <session id="SESSION_ID"/> value should not be confused with the SessionId returned by the JavaScript DDC, which must be supplied in the dfReferenceId attribute of <additional3DSData> for the initial payment request only.

Authorisation Response

This is received because either the first authorisation request was authenticated without a challenge (frictionless flow), or a challenge has been completed by the shopper.

The XML response from Worldpay confirms the result for the authorisation request (as per a non-authenticated authorisation), and the process ends here:

Upon receipt of this message, you complete the authorisation flow you normally would.

Testing

1. Create a JWT with static values

Once boarded to Cardinal in Secure Test, you can find your details in the Test section of the MAI This will include your:

  • OrgUnitId - This is the Org Unit ID in the MAI.
  • iss - This is the API ID in the MAI.
  • JWT MAC Key - This is the API Key in the MAI.

Use these values to test theJWT creation. All other claims must be present and not empty but can otherwise take any value.

2. DDC test URLs

Run the Javascript tosubmit the Device Datato the URL of the Cardinal simulator:

https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect

3. Create the initial XML request

Use the below test card numbers and magic values to create your initial XML.

Test card numbers

Insert the below values in the <cardNumber> field to simulate the test cases described in column one. The <cardholderName> magic values of AUTHORISED or REFUSED can be used to either authorise or refuse the payment.

3DS1

The following test cases have been added. These can be found in Cardinal's documentationhere.

Test CaseVisaMastercardJCBAmerican Express
Test Case 1: Successful Authentication400000000000000252000000000000073520000000000922340000000003961
Test Case 2: Failed Signature400000000000001052000000000000153520000000002811340000000006022
Test Case 3: Failed Authentication400000000000002852000000000000233520000000009931340000000000033
Test Case 4: Attempts/Non-Participating400000000000010152000000000009083520000000004767340000000003391
Test Case 5: Timeout400000000000004452000000000000493520000000001284340000000008309
Test Case 6: Not Enrolled400000000000005152000000000000563520000000006903340000000008135
Test Case 7: Unavailable400000000000006952000000000000643520000000002423340000000007780
Test Case 8: Merchant Not Active400000000000007752000000000000723520000000006549340000000008416
Test Case 9: cmpi_lookup error400000000000008552000000000000803520000000002175340000000006337
Test Case 10: cmpi_authenticate error400000000000009352000000000000983520000000006861340000000009299
Test Case 11: Authentication Unavailable400000000000003652000000000000313520000000005780340000000000116
Test Case 12: Bypassed AuthenticationNA52009900000000093500990000000001340099000000001

3DS2

The following test cases have been added. These can be found in Cardinal's documentationhere. Note: For 3DS2, we only support the following payment methods

  • Visa
  • Mastercard
  • American Express
If you provide PANs for the other payment methods found in Cardinal's documentation, the payment might be refused or processed as unauthenticated eCommerce.
Test CaseVisaMastercardAmerican Express
Test Case 1: Successful Frictionless Authentication40000000000010005200000000001005340000000001007
Test Case 2: Failed Frictionless Authentication40000000000010185200000000001013340000000001015
Test Case 3: Attempts Stand-In Frictionless Authentication40000000000010265200000000001021340000000001023
Test Case 4: Unavailable Frictionless Authentication from the Issuer40000000000010345200000000001039340000000001031
Test Case 5: Rejected Frictionless Authentication by the Issuer40000000000010425200000000001047340000000001049
Test Case 6: Authentication Not Available on Lookup40000000000010595200000000001054340000000001056
Test Case 7: Error on Lookup40000000000010675200000000001062340000000001064
Test Case 8: Timeout on cmpi_lookup Transaction40000000000010755200000000001070340000000001072
Test Case 9: Bypassed Authentication40000000000010835200000000001088340000000001080
Test Case 10: Successful Step Up Authentication40000000000010915200000000001096340000000001098
Test Case 11: Failed Step Up Authentication40000000000011095200000000001104340000000001106
Test Case 12: Step Up Authentication is Unavailable40000000000011175200000000001112340000000001114
Test Case 13: Error on Authentication40000000000011255200000000001120340000000001122

Test Case Scenarios

3DS1

Test CaseScenario SimulationAuthentication Outcome
Test Case 1: Successful AuthenticationSuccessful challengeCardholder authenticated
Test Case 2: Failed SignatureSuccessful challenge but invalid signatureError
Test Case 3: Failed AuthenticationChallenge failedFailed
Test Case 4: Attempts/Non-ParticipatingCard not enrolled in 3DS1Authentication offered but not used
Test Case 5: TimeoutTimeoutAuthentication Unavailable
Test Case 6: Not EnrolledCard not enrolled in 3DS1Authentication Unavailable
Test Case 7: UnavailableAuthentication unavailableAuthentication Unavailable
Test Case 8: Merchant Not ActiveMerchant not configured in Cardinal's systemAuthentication Unavailable
Test Case 9: cmpi_lookup errorError received on Cardinal responseAuthentication Unavailable
Test Case 10: cmpi_authenticate errorError received on Cardinal responseAuthentication Unavailable
Test Case 11: Authentication UnavailableAuthentication unavailableAuthentication Unavailable
Test Case 12: Bypassed AuthenticationMerchant using Cardinal rules to bypass 3DSEcommerce

3DS2

Test CaseScenario SimulationAuthentication Outcome
Test Case 1: Successful Frictionless AuthenticationFrictionless authentication successfulCardholder authenticated
Test Case 2: Failed Frictionless AuthenticationFrictionless authentication failedFailed
Test Case 3: Attempts Stand-In Frictionless AuthenticationAuthentication on behalf of Card SchemeAuthentication offered but not used
Test Case 4: Unavailable Frictionless Authentication from the IssuerFrictionless authentication rejectedAuthentication Unavailable
Test Case 5: Rejected Frictionless Authentication by the IssuerFrictionless authentication unavailableAuthentication rejected
Test Case 6: Authentication Not Available on LookupAuthentication unavailableAuthentication Unavailable
Test Case 7: Error on LookupError response received from CardinalAuthentication Unavailable
Test Case 8: Timeout on cmpi_lookup TransactionNo response from CardinalAuthentication Unavailable
Test Case 9: Bypassed AuthenticationMerchant using Cardinal rules to bypass 3DSEcommerce
Test Case 10: Successful Step Up AuthenticationSuccessful challengeCardholder authenticated
Test Case 11: Failed Step Up AuthenticationFailed challengeFailed
Test Case 12: Step Up Authentication is UnavailableAuthentication unavailableAuthentication Unavailable
Test Case 13: Error on AuthenticationError response received from CardinalAuthentication Unavailable

Note: Ensure you are sending the dfReferenceId in yourinitial XML. Extract the value for this from the SessionId that is returned by the Worldpay Device Data Collection simulator.

4. Challenge

If you have decided to use a magic value that invokes achallengeyou must create another JWT. Use the values as inStep 1.

Use the below URL to POST your challenge JWT in an iframe:

https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp

The Cardinal simulator POSTs back a standard response to the iframe. You are presented with a Cardinal Issuer page which allows you to enter a one-time password (OTP) which is visible on the page. Enter the password and click 'okay' to be redirected to your ReturnUrl.

5. Second XML request

Submit yoursecond XML request, making sure to include the same orderCode and session id you used in the initial XML request. You must also include the Machine Cookie received in the header of the first response.

You receive a Worldpay response with the payment outcome.

3DS 2.2

3DS Flex supports EMV 3DS 2.2 in line with the market.

About this guide

To see the latest changes made to this guide please clickhere.