Create 3DS Session
This method creates a 3DS authentication session and provides a redirectUrl
where the actual authentication takes place.
- Make sure to specify purpose according to the intended interaction as
PAYMENT_TRANSACTION
orADD_CARD
. - The method response contains a
redirectUrl
, to complete authentication, payer needs to be redirected and complete the challenge. - Once challenge completed, payer is redirected to
returnUrl
, this need to be used as trigger to issueGET 3ds-sessions/{id}
request to confirm transaction status an retrieve values required for payment / storing endpoints.
important
This endpoint contains PCI data and requires forwarding through /forwarding/tokenize
.
Example: Create a Payment 3DS Session
Request
Path:
POST {baseUrl}/3ds-sessions
Header:
Content-Type: application/json
Accept-Language: en-US
X-Pcp-Url: {baseUrl}/3ds-sessions
X-Pcp-Authorization: {{pci_base64_public_private}}
X-Pcp-Cc-Path: cardDetails.cardToken
Authorization: Basic M2lwN2Yx...OGU3Mg==
{
"cardDetails": {
"cardHolder": "JOHN DOE",
"cardToken": "5123450000000008",
"cardExpiryMonth": "09",
"cardExpiryYear": "2029",
"cardBrand": "MSTRCRD"
},
"authenticationAmount": {
"amount": 20,
"currencyCode": "EUR"
},
"purpose": "PAYMENT_TRANSACTION",
"returnUrl": "https://www.example.com",
"shippingAddress": {
"addressLine1": "Max-Planck Str",
"number": "30",
"city": "Berlin",
"postCode": "14473",
"countryCode": "DE"
},
"billingAddress": {
"addressLine1": "Max-Planck Str",
"number": "30",
"city": "Berlin",
"postCode": "14473",
"countryCode": "DEU"
}
}
API Parameters:
Name | Description | Type | Required |
---|---|---|---|
cardDetails | Object | Yes | |
- cardHolder | Credit card holder name. | String | Yes |
- cardToken | PAN token. | String | Yes |
- cardExpiryMonth | Credit card expiration month in format "MM". | Numeric | Yes |
- cardExpiryYear | Credit card expiration year in format "YYYY". | Numeric | Yes |
- cardBrand | Card brand code. Please refer to Data Model - Payment Options. | String | Yes |
authenticationAmount | Information about the operation amount. | Object | Yes |
- amount | Operation amount. | Number | Yes |
- currencyCode | Operation currency ISO-4217 3-letter code. | String | Yes |
purpose | Indicates the purpose of 3ds authentication, either ADD_CARD or PAYMENT_TRANSACTION . | String | Yes |
returnUrl | URL provided by merchant which will be called upon completion of the 3ds authentication. Example: https://my-webshop.com/3ds-return | String | Yes |
shippingAddress | Please refer to Data Model - Address. | Object | Yes |
billingAddress | Please refer to Data Model - Address. | Object | Yes |
Response
Status Code:
201 (3DS session successfully created)
Header:
Content-Type: application/json
Accept-Language: en-US
{
"id": "d04b5f52-12e2-470c-b38d-26aa06e40dc2",
"redirectUrl": "https://3ds-api.cons.shared.upcf.jpmmps.com/public/sessions/d04b5f52-12e2-470c-b38d-26aa06e40dc2/payment-form"
}
API Parameters:
Name | Description | Type |
---|---|---|
id | SessionId that can be used to obtain 3DS authentication result and details in GET 3ds-sessions/{id} . | String |
redirectUrl | redirectUrl is the URL where the merchant redirects the end user. | String |
Example: Create a Storing 3DS Session
Request
Path:
POST {baseUrl}/3ds-sessions
Header:
Content-Type: application/json
Accept-Language: en-US
X-Pcp-Url: {baseUrl}/3ds-sessions
X-Pcp-Authorization: {{pci_base64_public_private}}
X-Pcp-Cc-Path: cardDetails.cardToken
Authorization: Basic M2lwN2Yx...OGU3Mg==
{
"cardDetails": {
"cardHolder": "JOHN DOE",
"cardToken": "5123450000000008",
"cardExpiryMonth": "09",
"cardExpiryYear": "2029",
"cardBrand": "MSTRCRD"
},
"authenticationAmount": {
"amount": 20,
"currencyCode": "EUR"
},
"purpose": "ADD_CARD",
"returnUrl": "https://www.example.com",
"shippingAddress": {
"addressLine1": "Max-Planck Str",
"number": "30",
"city": "Berlin",
"postCode": "14473",
"countryCode": "DE"
},
"billingAddress": {
"addressLine1": "Max-Planck Str",
"number": "30",
"city": "Berlin",
"postCode": "14473",
"countryCode": "DEU"
}
}
Response
Status Code:
201 (Created)
Header:
Content-Type: application/json
Accept-Language: en-US
{
"id": "af2e9557-d6dc-4692-9da6-909ddbdbf4a8",
"redirectUrl": "https://3ds-api.cons.shared.upcf.jpmmps.com/public/sessions/af2e9557-d6dc-4692-9da6-909ddbdbf4a8/payment-form"
}