V2 Initialisation Api
The initialization call must be sent to start the 3D Secure v2 authentication flow. Successful initialization
responses will return the 3DS Initialisation details in response
API Details
Mode:- Stateless REST API
API URL: - {{paymentApiUrl}}/3ds/v2/initialization
HTTP Method:- POST
Request Body in Json
{
"netvalveMidId":{{netvalveMidId}},
"amount": 43.10,
"currency": "USD",
"cardExpireMonth": "08",
"cardExpireYear": "2025",
"cardHolderName": "Yogesh",
"cardNumber": "4000000000001091",
"merchantRedirectUrl": "https://amazon.com/redirect",
"customerIp": "123.123.123.123",
"customerEmail": "yogesh@dahe.com",
"customerPhone": "+919900000000",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
"browserHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8",
"browserJavaEnabled": true,
"browserLanguage": "en-US",
"browserColorDepth": 24,
"browserScreenHeight": 864,
"browserScreenWidth": 1536,
"browserTimeZone": 300
}
Note :- As a new 3DS Visa mandate, the customer needs to send an email and phone in the below format to avoid 3DS compliance issues.
"customerEmail": "yogesh@dahe.com",
"customerPhone": "+919900000000", (Customer Phone in the format of coutrycode-phone . e.g +919900000000)
Request table
Parameter | Type | Required | Description |
---|---|---|---|
|
| Yes | Netvalve Mid Id configured with merchant profile. e.g. aa09538b-2148-4e0b-8418-28391caa6af2 |
|
| Yes | Transaction Amount e.g. 100.50 |
|
| Yes |
|
|
| Yes |
e.g. |
|
| Yes |
e.g. |
|
| Yes |
|
|
| Yes | Valid card number |
|
| Optional(In case of redirect required) | valid merchant redirect URL |
|
| Yes | IP address |
|
| Conditional. Required for Visa 3DS. | Customer Phone in the formate of coutrycode-phone . e.g |
|
| Conditional. Required for Visa 3DS. | Customer email |
|
| Yes |
|
|
| Yes |
|
|
| Yes |
|
|
| Yes |
Format :- |
|
| Yes |
|
|
| Yes |
|
|
| Yes |
|
|
| Yes |
Format :- like |
Generating browser data for the request body
The browser
related parameters in the request must be fetched on the client. You can use this JavaScript function to collect this data:
function fetchBrowserData(){
return {
userAgent: navigator.userAgent,
browserHeader: 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8',
browserJavaEnabled: navigator?.javaEnabled() || false,
browserLanguage: navigator?.language || navigator?.userLanguage,
browserColorDepth: screen.colorDepth,
browserScreenHeight: screen.height,
browserScreenWidth: screen.width,
browserTimeZone: new Date().getTimezoneOffset()
};
}
const browserData = fetchBrowserData();
// include in the Initialization API request
Â
Note: The browserHeader can be the hard coded string above. This will be unnecessary in future versions.
Â
HTTP Response Codes
200 Sucess
401 Unauthorised
404 Bad request
500 Service Unavailable
Â
Responses for different flows.
The following indicates the response for each of the possible 3DS flows. The merchant must check the response to see which flow to take.
Â
FLOW A: 3DS Complete
See V2 Flows for a description of this flow.
Frictionless Flow
Frictionless Success Criteria:- Response must have the below data and the client should add those checks
"responseCode" = "3DS_1000"
"transID" = (Non Null value)
"threeDs2TransactionId" = (Non Null value)
"eci" = (Non Null value)
"cavv" = (Non Null value)
"threeDsVersion" = (Non Null value
Note:- If the above success criteria match skip all the next steps and use eci
,cavv
,threeDs2TransactionId
,threeDsVersion
in payment.
Â
FLOW B: challenge required
See V2 Flows for a description of this flow.
ACS Success Criteria:-Response must have the below data and the client should add those checks
"responseCode" = "3DS_1000"
"transID" = (Non Null value)
"challengeRequired" = true
"redirectUrl" = (Non Null value)
"status" =
ACS_REQUIREDNote:- If the above success criteria match then follow the next step as (step 4) and in seq for the next
FLOW C:- Device data collection required
See V2 Flows for a description of this flow.
Success Criteria:- Response must have the below data and the client should add those checks
"responseCode" = "3DS_1000"
"transID" = (Non Null value)
"redirectUrl" = (Non Null value)
"status" = INITIALIZED
Note:- If the above success criteria match then follow the next step as (step 2) and in seq of the next
Â
Response table
Parameter | Type | Required | Description |
---|---|---|---|
|
| Yes | Trace Id / Corellation ID :- Unique id for 3DS Transaction to trace back / enquiry. e.g. |
|
| Yes | Date time of response. e.g. |
|
| Yes |
e.g. More Error Codes |
|
| Yes |
|
|
| Optional (present in case of valid request) |
|
midId | Long | Yes | Mid ID |
| String | Yes |
|
Â
ThreeDSProviderResponse table
Â
Parameter | Type | Required | Description |
---|---|---|---|
|
| Yes |
e.g. |
|
| Yes |
e.g. |
|
| Yes |
e.g. |
|
| Yes |
e.g.
More details ECI Codes |
|
| Yes | CAVV e.g. |
| boolen | Optional | true/false |
|
| Optional |
|
|
| Yes |
|
|
| Optional | e.g. |
|
| Optional | e.g. “ |
Â
Â
Error Codes
Â
Â