3‑D Secure authentication
Overview
General information
3‑D Secure (Three-Domain Secure) customer authentication is aimed to increase secure processing of online card payments. This authentication procedure can be carried out in a variety of ways: the customer may be required to provide a one-time PIN (OTP) code to confirm their identity, the customer's fingerprint may be verified on their device, or the customer's involvement may be bypassed altogether based on the payment and customer data. The choice of the authentication mechanism is decided on a case-by-case basis.
3‑D Secure involves the interaction of three domains:
- Acquirer domain: in the context of the ecommpay payment platform interoperability, it includes the merchant's web service, the payment platform and its 3DS Server.
- Interoperability domain: it includes the Directory Servers (DS) of global card schemes.
- Issuer domain: it includes the issuer's Access Control Servers (ACS) and the authentication page.
The domains exchange messages that are required to authenticate the customer. These messages include the request to determine whether a certain cardholder can be authenticated (Verifying Enrolment Request, VEReq) and the corresponding response (Verifying Enrolment Response, VERes) as well as the customer authentication request (Challenge Request, CReq) and the response containing the authentication result information (Challenge Response, CRes).
Note that the information about the possibility of customer authentication and the protocol version is stored on the Access Control Server, and this information can be obtained only after a payment request has been sent. Moreover, the web service and the payment platform do not have control over customer actions on the authentication page; they can only receive the authentication result information.
3‑D Secure authentication flows
3‑D Secure supports the following authentication flows:
- Frictionless flow—authentication that does not involve interaction with the customer. Customers are authenticated with the use of data that the issuer already has.
- Challenge flow—authentication that requires the customer to perform certain actions in order to confirm their identity. Customers can be authenticated with the use of one-time code or biometric data if this capability is supported by the issuer, for example.
The merchant cannot select the authentication flow. While the merchant can indicate which flow selection is preferable, the final decision is made by the issuer. In addition to specifying the preferred flow, the merchant can pass a range of optional parameters in the payment request which increases the possibility of the frictionless flow selection and thereby helps increase acceptance rates and enhances customer experience. Most frequently used optional parameters include the customer's billing address (parameters passed in the billing
object) and the User-Agent HTTP header received from the browser (the browser
parameter). Information about these and other parameters can be found below.
Special aspects
Out of scope payments
As a rule, the 3‑D Secure authentication is mandatory for card payments. It is dictated by the requirements of the Payment Services Directive 2 (PSD2) that includes the requirement of Strong Customer Authentication (SCA) to be applied to such payments.
Payments that do not fall under the scope of the SCA mandated by PSD2 include:
- Payments made with cards when the card country is not located in the European Economic Area.
- Payments made with anonymous prepaid cards, for example, a gift card or a prepaid virtual card.
- MO/TO (Mail Order/Telephone Order) payments.
- Merchant-initiated transactions (MIT). In the ecommpay payment platform such payments include autopurchases and regular purchases (
recurring
payment type) as well as operations to change the authorised amount (incremental
operation type). - Most alternative payments.
The payment platform supports the capability to identify payments that belong to any of the aforementioned categories. As a result, they are not subject to 3‑D Secure.
Exemptions
Under PSD2, there are several exemptions to SCA when the authentication is deemed not necessary by the issuer. The exempt payments can be categorised as follows:
- Low value payments (Low value exemption)—if it is a payment for an amount below 25 GBP (within Great Britain) or 30 EUR (within the EEA). Along with that, there should be no more than five payments since the most recent successful authentication attempt, and the total amount of these payments should not exceed 85 GBP or 100 EUR respectively.
- Low risk payments (Transaction Risk Analysis exemption)—if it is a payment processed by an acquirer with the fraud rates that fall below the thresholds defined in PSD2.
- Payments to trusted merchants (Trusted beneficiaries exemption)—if it is a payment to a merchant that was added by the cardholder to a trusted list.
- Secure corporate payments (Corporate payments exemption)—if it is a payment initiated by a company with the use of procedures and protocols that ensure high level of fraud protection.
The payment platform supports working with the SCA exemptions for Mastercard and Visa payments of a certain value or that fall below a certain fraud level threshold.
Working with the SCA exemptions
Applying exemptions may keep the customer payment experience frictionless and increase the payment acceptance rates. However, the merchant is held liable for possible fraud in case of exempt payments.
If this capability is enabled, the relevant exemptions are applied automatically with the exception of the specific payments for which the merchant indicates that the authentication is necessary. At the same time, keep in mind that the exempt payment can still be processed with the authentication should the issuer deem it necessary. In this case, the issuer responds with a soft decline which means the authentication is required. Following a soft decline, the standard authentication without exemptions is performed, and as a rule, challenge flow is used. Moreover, exemptions do not apply in case of the COF purchase registration for which 3‑D Secure is mandatory.
Information about applied exemptions is passed in the payment result callbacks and shown in the payment information tabs in Dashboard. If you have any questions about enabling and setting up this capability, refer to your ecommpay account manager.
Authentication workflows in the payment platform
In the ecommpay payment platform, the 3‑D Secure authentication is implemented in the processing of one-step and two-step purchases made with cards and card verification requests. Along with that, two authentication workflows are available: basic (a.k.a. proxy) and extended, (a.k.a. native).
The basic workflow can require less development effort from the merchant, yet it also requires additional customer redirect operations. The extended workflow does not require additional redirection, but it can require more development effort. The merchant can choose either of the workflows. However, extended workflow is preferable as it ensures better user experience and can positively impact payment acceptance rates.
You can switch from basic to extended workflow at any time; no additional coordination with the ecommpay specialists is necessary. In the payment request pass the parameters required for the extended workflow. They are listed below, in Payment request format.
User scenarios
Depending on the implemented workflow, the authentication flow selected by the issuer, and other factors, the authentication process can vary. For example, when the customer is being authenticated, they can be shown the preloader page by the web service or the platform and the ACS page by the issuer.
To illustrate, if the extended workflow is used, the user scenario may include the following steps.
Authentication workflows
Basic workflow
In the payment platform, communicating the need for the 3‑D Secure authentication to merchants is carried out via callbacks. Your web service is expected to respond to these callbacks the same way it responds to any other callbacks received from the payment platform.
Basic authentication workflow implies that the callback communicating the need for authentication contains the acs
object. To respond to such callbacks, you need to redirect the customer to the issuer's ACS page, accept the authentication result, and send the payment completion request with the result to the payment platform. Note that once the need for authentication is established, the payment platform waits for the payment completion request with the authentication result from the web service; as a rule, the waiting time is 30 minutes. If the payment platform does not receive the request with the authentication result within the waiting time, the payment is automatically declined.
When you submit the authentication result, the payment platform continues payment processing. If the cascading payments option is enabled, the platform may request the 3‑D Secure authentication in one or more additional callbacks. If the additional callback contains the cascading_with_redirect
parameter that is set to true
, your web service is required to do the following:
- Display an error message to a customer on a page and obtain their consent to re-authenticate.
- Respond to the callback accordingly.
For more information, see Cascade payment processing or contact the technical support specialists at support@ecommpay.com.
Information about the format of requests and callbacks is provided in the sections that follow. General information about using the Gate API can be found in Interaction concepts.
Extended workflow
In the payment platform, communicating the need for the 3‑D Secure authentication is carried out via callbacks. Your web service is expected to respond to these callbacks the same way it responds to any other callbacks received from the payment platform. However, there is no authentication-specific communication when the issuer makes the decision not to request any additional data while implementing the frictionless flow. In this case, the web service is not required to perform any actions other than those implied by the standard payment processing workflow while the authentication result is passed in the final callback.
In the extended workflow, the callback communicating the need for authentication contains the iframe
object (in the threeds2
object). Responding to such callbacks requires your web service to do the following:
- Using the data received in the callback, display the iframe element to the customer.
- Accept the acknowledgement message from the issuer's Access Control Server and send the authentication initiation request to the payment platform.
- If the issuer decides to use the frictionless flow, the web service is required to accept a callback with the authentication result information from the payment platform. If the issuer selects the challenge flow, the web service is required to complete the following steps:
- Accept a callback from the payment platform with the
redirect
object (in thethreeds2
object) and respond with the callback acknowledgement. - Redirect the customer to the authentication page within 30 seconds after the callback was received.
- Accept the authentication result from the issuer.
- Send a payment completion request with the authentication result in the
3ds_result
parameter to the payment platform within 30 minutes after the need for authentication was determined.
- Accept a callback from the payment platform with the
When you submit the authentication result, the payment platform continues payment processing. If the cascading payments option is enabled, your web service may need to accept one or more additional callbacks with the redirect
object. If the additional callback contains the cascading_with_redirect
parameter that is set to true
, your web service is required to do the following:
- Display an error message to a customer on a page and obtain their consent to re-authenticate.
- Respond to the callback accordingly.
For more information, see Cascade payment processing or contact the technical support specialists support@ecommpay.com.
Information about the format of callbacks and requests used in the extended workflow can be found in Format of intermediate messages for extended workflow. General information about using the Gate API is provided in Interaction concepts.
Payment request format
Overview
Overall, the format of the payment request does not affect the probability of whether the authentication is going to be triggered and should conform to the standard described in Interaction concepts. Similarly, the required parameters used for a certain payment should align with the parameter sets described in the articles about corresponding payment types and should also include the screen resolution of the customer's device (screen_res
), the customer's email (email
) and phone number (phone
). In addition, in case of the extended authentication workflow, the parameters should contain the acs_return_url
object with the web service URLs for redirecting the customer to the web service and for accepting acknowledgement from the issuer.
However, it is also recommended that you pass such optional parameters as additional payment data (for example, the preferred authentication flow and selected shipping method) and information about the customer (for example, the customer's billing address) to increase the possibility of the issuer's selecting the frictionless flow that bypasses interaction with the customer altogether. The merchant web service can pass all of these parameters or only some of them. Most frequently used optional parameters include the customer's billing address (parameters passed in the billing
object) and the User-Agent HTTP header received from the browser (in the browser
parameter).
Required parameters
In the extended workflow, required parameters must include the acs_return_url
object that contains the following data:
Parameter | Description |
---|---|
|
The URL to redirect the customer to the web service after authentication. Mandatory if you use the extended authentication workflow. |
|
The URL the web service uses for accepting receipt acknowledgement from ACS. Mandatory if you use the extended authentication workflow. |
Optional parameters
Both in basic and extended workflows, use the following optional parameters to pass payment and customer data in the payment requests:
Parameter | Description | tree |
---|---|---|
|
Object that contains customer data. | 2 |
|
Value of the Accept request HTTP header as received from the customer's browser. | 2-12 |
|
Value of the User-Agent request HTTP header as received from the customer's browser. | 2-22 |
|
The colour depth of the screen as supported by the customer's browser, bits per pixel. | 2-32 |
|
Indicates whether the customer's browser supports Java. | 2-42 |
|
Indicates whether the customer's browser supports JavaScript. | 2-52 |
|
The code of the customer's browser language. | 2-62 |
|
Screen resolution of the customer's device, in pixels, with an x character as a delimiter (for example, 360x640 ). |
2-72 |
|
The name of the time zone the customer's browser is set to (for example, Europe/London ). |
2-82 |
|
The difference between a date as evaluated in the UTC time zone and the same date as evaluated in the browser time zone, specified in minutes, (for example, -120 . |
2-92 |
|
Indicates whether the customer's billing address matches the address specified in the Possible values:
|
2-102 |
|
Customer's home phone number, contains between 4 and 24 digits (for example, 44991234567 ). |
2-112 |
|
Customer's work phone number, contains between 4 and 24 digits (for example, 44997654321 ). |
2-122 |
|
Object with the customer's account information kept on file by the merchant. | 2-132 |
|
Additional information about the customer's account in free text, for example, its identifier. Can contain up to 64 characters. | 2-13-12-13 |
|
Number of payment attempts in the last 24 hours, 3 characters maximum (999 ). |
2-13-22-13 |
|
Number of payment attempts in the last 365 days, 3 characters maximum (999 ). |
2-13-32-13 |
|
Number of days since the customer account was created. Possible values:
|
2-13-42-13 |
|
Additional login information in free text, can contain up to 255 characters. | 2-13-52-13 |
|
Indicates how the customer was authenticated during their most recent login to the web service. Possible values:
|
2-13-62-13 |
|
Date and time of the customer's most recent account login in the DD-MM-YYYYhh:mm format. |
2-13-72-13 |
|
Account creation date in the DD-MM-YYYY format. |
2-13-82-13 |
|
Date of the most recent change to the account, except for the password change or password reset, in the DD-MM-YYYY format. |
2-13-92-13 |
|
Number of days since the most recent change to the account, except for the password change or password reset. Possible values:
|
2-13-102-13 |
|
Date of the most recent password change or reset in the DD-MM-YYYY format. |
2-13-112-13 |
|
Number of days since the most recent password change or reset. Possible values:
|
2-13-122-13 |
|
Card record creation date in the DD-MM-YYYY format. |
2-13-132-13 |
|
Number of days since the payment card details were saved to a customer's account. Possible values:
|
2-13-142-13 |
|
Number of attempts to save new card details to a customer's account in the last 24 hours, 3 characters maximum (999 ). |
2-13-152-13 |
|
Number of purchases made via the customer's account in the last 6 months, 4 characters maximum (9999 ). |
2-13-162-13 |
|
Indicates the presence of suspicious activity. Possible values:
|
2-13-172-13 |
|
Customer's email. | 2-142 |
|
Customer's phone number, contains between 4 and 24 digits. | 2-152 |
|
Object with information about the customer's billing address. | 2-162 |
|
Street of the customer's billing address. | 2-16-12-16 |
|
City of the customer's billing address. | 2-16-22-16 |
|
Country of the customer's billing address in the ISO 3166-1 alpha-2 format. | 2-16-32-16 |
|
Postal code of the customer's billing address. | 2-16-42-16 |
|
State, province, or region code in the ISO 3166-2 format, for example, DEV for Devon.If you specify this parameter, you also need to specify and populate the |
2-16-52-16 |
|
Object with shipping details. | 2-172 |
|
Shipping address, can contain up to 150 characters. | 2-17-12-17 |
|
Date when the specified shipping address was used for the first time, in the DD-MM-YYYY format. |
2-17-22-17 |
|
Number of days since the specified shipping address was used for the first time. Possible values:
|
2-17-32-17 |
|
Shipping city, can contain up to 50 characters. | 2-17-42-17 |
|
Shipping country code in the ISO 3166-1 alpha-2 format (for example, GB). | 2-17-52-17 |
|
The email to deliver purchased digital content to if the customer chooses email delivery. Can contain up to 255 characters. | 2-17-62-17 |
|
Delivery time. Possible values:
|
2-17-72-17 |
|
Indicates whether the customer's name matches the recipient's name. Possible values:
|
2-17-82-17 |
|
Shipping postal code, can contain up to 16 characters. | 2-17-92-17 |
|
State, province, or region code in the ISO 3166-2 format, for example, DOR for Dorset.If you specify this parameter, you also need to specify and populate the |
2-17-102-17 |
|
Delivery option selected by the customer. Possible values:
|
2-17-112-17 |
|
Object that contains information about the previous authentication attempt of the customer. | 2-182 |
|
The identifier that the issuer assigned to the previous operation of the customer and returned in the acs_operation_id parameter of the callback with payment processing result. Can contain up to 36 characters. |
2-18-12-18 |
|
The flow used by the issuer to authenticate the cardholder when processing the previous operation. It is a value of the Possible values:
|
2-18-22-18 |
|
Date and time of the previous successful customer authentication as returned in the mpi_timestamp parameter of the callback with payment processing result. |
2-18-32-18 |
|
Object with payment information. | 3 |
|
Indicates whether the challenge flow is preferred. Possible values:
|
3-13 |
|
The dimensions of a window in which the authentication page opens. Possible values:
|
3-23 |
|
The date the preordered merchandise or service will be available in the DD-MM-YYYY format. |
3-33 |
|
Indicates whether the purchase is a preorder. Possible values:
|
3-43 |
|
Indicates whether the customer is buying the merchandise or the service for the first time or it is a repeat purchase. Possible values:
|
3-53 |
|
Object with information about a purchase made with a prepaid or gift card. | 3-63 |
|
The amount of the purchase made with a prepaid or gift card in the smallest units of currency. | 3-6-13-6 |
|
Currency of the purchase made with a prepaid or gift card in the ISO 4217 alpha-3 format (for example, GBP). | 3-6-23-6 |
|
Number of prepaid or gift cards used for making the purchase. | 3-6-33-6 |
Format of intermediate messages for basic workflow
Callback format when authentication is needed
When the basic authentication flow is used, the callback containing the data for redirecting the customer is sent from the payment platform to the web service. These callbacks are arranged in a standard format described in greater detail in the following article.
The redirection data is passed in the acs
object. The acs
object of the callback contains the following data: the CReq message (in the pa_req
parameter) to send the authentication initiation request to the issuer, the URL of the authentication page (acs_url
), and the merchant data kept on file by the card scheme (md
).
Format of the redirection request
To redirect the customer to the issuer's ACS page or the provider's page, send the request to the URL received in the callback that signals the need for authentication. Use a POST method and include the following objects and parameters
action
—the URL of the ACS page to redirect the customer to, sourced from theacs_url
parameter of the callback.PaReq
—a CReq message sourced from thepa_req
parameter of the callback.TermUrl
—the URL of the web service to redirect the customer to after the authentication procedure has been completed.MD
—information about the merchant kept on file by the global card scheme, sourced from themd
parameter of the callback.
For your convenience, here is a ready-made HTML file that you can use by replacing the sample code with the actual payment parameters.
Format of the message with the authentication result
The message with the authentication result is sent to the web service in the pares
parameter.
Format of the payment completion request
To resume processing of the payment once the authentication procedure has been completed, send a request to the /v2/payment/card/3ds_result endpoint using the POST HTTP method. The request must contain the following objects and parameters:
general
—the object containing the general identification information of the request:project_id
—the project identifier obtained from ecommpay.payment_id
—the payment identifier unique within the merchant project.signature
—the request signature generated after all required parameters have been specified. For more information about signature generation, see Signature generation and verification.
pares
—the parameter containing the customer's 3‑D Secure authentication result sourced from the PARes message.
Thus, a correct request for payment completion following the 3‑D Secure authentication contains project and payment identifiers, the signature, and the authentication result.
Format of intermediate messages for extended workflow
Format of the callback with iframe data
When the extended authentication flow via Gate is used, the callback containing the data for an iframe element is sent from the payment platform to the web service. These callbacks are arranged in a standard format described in greater detail in the following article.
The payment platform does not send callbacks with iframe data when the issuer decides to use either of the following options without factoring in the customer's device information:
- the challenge flow: the customer is redirected to the authentication page for verification. In this case, your web service is required to accept and process the callback with the redirection data. For more information, see below.
- the frictionless flow: the issuer authenticates the customer. In this case, your web service is required to accept and process the callback with the payment result.
The following example contains data for creating an iframe element. Use the value of the url
parameter from the iframe data as the value of the action
attribute and specify the values of other parameters inside the corresponding input
tags of the iframe code.
Callback format when authentication is needed
When the extended authentication flow via Gate is used, the callback containing the data for redirecting the customer to the issuer's ACS page is sent from the payment platform to the web service. These callbacks are arranged in a standard format described in greater detail in the following article. If the issuer decides to use the frictionless flow, the payment platform does not send callbacks with the customer redirection data. In this case, your web service is required to accept and process the callback with the payment result.
The following example contains data for redirecting the customer to the authentication page. Use the value of the url
parameter as the value of the action
attribute, and specify the values of other parameters inside the corresponding input
tags of the HTML code.
Format of the message acknowledging the receipt of the customer's device information
In the extended authentication workflow, the issuer's Access Control Server sends a message with an acknowledgement of receiving the customer's device data to the web service URL provided in the initial payment request (in the 3ds_notification_url
parameter. The message is arranged in the format chosen by the issuer.
Format of the authentication initiation request
When you use the extended authentication workflow, you initiate the authentication by sending a HTTP POST request to the /v2/payment/card/3ds_check_iframe endpoint. The request must contain the following objects and parameters:
general
—the object containing the general identification information of the request:project_id
—the project identifier obtained from ecommpay.payment_id
—the payment identifier unique within the merchant project.signature
—the request signature generated after all required parameters have been specified. For more information about signature generation, see Signature generation and verification.
threeds_completion_indicator
—the parameter that indicates whether the message acknowledging the receipt of the customer's device information was received within 10 seconds after the iframe element was closed. If the acknowledgement was received within 10 seconds, passtrue
; if not, passfalse
.
Thus, a correct request for the 3‑D Secure authentication initiation contains a project identifier, a payment identifier, and a signature.
Format of the message with the authentication result
When the extended authentication flow via Gate is used, the authentication result is sent to the web service in the format chosen by the issuer. This information is passed in the cres
parameter contained in the message.
Format of the payment completion request
Both the basic and the extended authentication flows via Gate imply that to resume processing of the payment once the authentication procedure has been completed, you have to send a request to the /v2/payment/card/3ds_result endpoint using the POST HTTP method. The request must contain the following objects and parameters:
general
—the object containing the general identification information of the request:project_id
—the project identifier obtained from ecommpay .payment_id
—the payment identifier unique within the merchant project.signature
—the request signature generated after all required parameters have been specified. For more information about signature generation, see Signature generation and verification.
cres
—the parameter containing the customer's 3‑D Secure authentication result sent in the message from the Access Control Server.
Thus, a correct request for payment completion following the 3‑D Secure authentication contains project and payment identifiers, the signature, and the authentication result.
Format of callbacks with payment results
To communicate the payment result, the payment platform sends a callback to the web service. The callback is arranged in a standard format described in Callbacks.
If payment processing involves the 3‑D Secure authentication, callbacks may contain the mpi_result
object with the following parameters:
mpi_operation_id
—operation identifier on the 3DS Server sideds_operation_id
—operation identifier on the Directory Server side of the global card schemeacs_operation_id
—operation identifier on the issuer's Access Control Server sidempi_timestamp
—authentication time and datecardholder_info
—the message you are recommended to display when notifying the customer about the payment resultauthentication_flow
—authentication flow indicator:01
for the frictionless flow,02
for the challenge flow.
These parameters are not passed by default. To add them to the callbacks you receive, contact the technical support at support@ecommpay.com.
If the authentication was not performed due to an applied exemption, the operation
object of the callback can also contain the non_3ds_reason
parameter with the value tra, lve
.