Skip to main content

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 or ADD_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 issue GET 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                                    DescriptionTypeRequired
cardDetailsObjectYes
    - cardHolderCredit card holder name.StringYes
    - cardTokenPAN token.StringYes
    - cardExpiryMonthCredit card expiration month in format "MM".NumericYes
    - cardExpiryYearCredit card expiration year in format "YYYY".NumericYes
    - cardBrandCard brand code. Please refer to Data Model - Payment Options.StringYes
authenticationAmountInformation about the operation amount.ObjectYes
    - amountOperation amount.NumberYes
    - currencyCodeOperation currency ISO-4217 3-letter code.StringYes
purposeIndicates the purpose of 3ds authentication, either ADD_CARD or PAYMENT_TRANSACTION.StringYes
returnUrlURL provided by merchant which will be called upon completion of the 3ds authentication.
Example: https://my-webshop.com/3ds-return
StringYes
shippingAddressPlease refer to Data Model - Address.ObjectYes
billingAddressPlease refer to Data Model - Address.ObjectYes

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                                    DescriptionType
idSessionId that can be used to obtain 3DS authentication result and details in GET 3ds-sessions/{id}.String
redirectUrlredirectUrl 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"
}