Check Authentication Method V2

You need to implement the Check Authentication Method V2 API if you wish to be consulted for every e-commerce transaction. Nium invokes this API to get the authentication method from you during the e-commerce transaction.

POST https://<EComAuthCodeValidationBaseURL>/v2/preference

đź“Ś

IMPORTANT

EComAuthCodeValidationBaseURL is the URL that you provide during the setup and which Nium uses as a base URL.

Headers

HeaderParameters
content-typeapplication/JSON
x-request-idUUID
x-client-nameString

Request body

The API's request body is divided into these three areas:

Card information

FieldDescriptionTypeRequired/Optional
maskedCardNumberThe 16-digit masked card number in format 1234-56xx-xxxx-3456.UUIDRequired
customerHashIdThe unique customer identifier that's generated on customer creation.UUIDRequired
cardHashIdThe unique card identifier that's generated while new or add-on card issuance.UUIDRequired
emailThis field accepts the customer's email address ID.StringRequired
phoneNumberThis field accepts the customer’s phone number.StringRequired
cardExpiryThe card expiration year. This field contains the base64 encoded expiration date of the card in the YYMM format.NumberRequired

Merchant information

FieldDescriptionTypeRequired/Optional
idThe identifier for the merchant performing the purchase request.StringOptional
nameThis field accepts the merchant's name.StringRequired
mccThe code that's used to describe the merchant type of business.StringOptional
countryCodeThe country code of the merchant, for example, 840 numeric -3 format.StringOptional
urlThe URL or app name for the merchant performing the purchase request.StringOptional

Transaction information

FieldDescriptionTypeRequired/Optional
amountThis field accepts the transaction amount up to two decimals. The formatted transaction amount.NumberRequired
currencyThis field accepts the three-letter ISO-4217 transaction currency code.StringRequired
timestampThe transaction time stamp, for example, 2020-03-21T20:55:49.0000Z.StringOptional

Request example

curl -X POST \
  <https://<EComAuthCodeValidationBaseURL>/v2/preference> \
  -H 'content-type: application/json' \
  -H 'x-request-id: 123e4567-e89b-12d3-a456-426655440000' \
  -H 'x-client-name: Cards-Card-Service' \
  -d '{
    "clientHashId": "e4wc6a3b-52a0-2301-a670-08db16e8447a",
    "customerHashId": "df3dfdf-d75a-4d7e-b575-f8ed34egfh94",
        "card",
      {
      "maskedCardNumber" : "4611-35xx-xxxx-1234",
      "cardHashId": "5fh34flg-8e7a-4bb5-a010-3a07cf714534",
      "email": "[email protected]",
      "phoneNumber": "9834201949",
      "cardExpiry":""
      },    
      "merchant",
      {
      "id":"",
      "name" : "Test Merchant",
      "mcc":"",
      "countryCode":"",
      "url":""
      }
      "transaction",
      {
      "amount": "1.10",
      "currency": "EUR",
      "timestamp":""
      }
    }

Response body

FieldDescriptionType
respCodeThe response code. The possible values are:
• 00—If OOB is the only authentication method supported.
• 01—If OOB with the fallback option (OTP plus passcode) method is supported.
• 02—If OTP plus passcode is the only supported method.
• 03—If OTP is the only method supported.
• 04—If OOB with fallback option OTP.
String
messageThe message that's based on the preferences. The possible values are:
• OOB Only—Only the OOB authentication method is supported.
• OOB with fallback to OTP+Passcode—If the OOB with fallback option (OTP plus passcode) method is supported.
• OTP+Passcode Only—If only the OTP plus passcode method is supported.
• OTP Only—If the OTP-only method is supported.
• OOB with fallback OTP—If the OOB with the fallback option (OTP) method is supported.
String

Response example

Success response — for OOB only

{
  "respCode" : "00", 
  "message"  : "OOB Only"
 }

Success response — for OOB with fallback to OTP SMS + passcode

{
  "respCode" : "01", 
  "message"  : "OOB with fallback to OTP+Passcode"
 }

Success Response — for OTP SMS + Passcode only

{
  "respCode" : "02", 
  "message"  : "OTP+Passcode Only"
 }

Success response — for OTP only

{ 
  "respCode" : "03",
  "message"  : "OTP Only"
}

Success response — for OOB with fallback to OTP

{
  "respCode" : "04",
  "message"  : "OOB with fallback to OTP"
}