Skip to main content

Check Authentication

Implement the Check Authentication Method V2 API if you want your system to be consulted for every e-commerce transaction. Nium invokes this API during an e-commerce transaction to retrieve the authentication method supported by your system.

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

EComAuthCodeValidationBaseURL is the base URL you provide during integration setup. Nium uses this URL to invoke your API. Replace the placeholder with your configured host when testing the example.

Headers​

HeaderDescriptionExample
content-typeRequest body content type.application/json
x-request-idUnique request identifier.123e4567-e89b-12d3-a456-426655440000
x-client-nameName of the calling application.Cards-Card-Service

Request body​

The request contains general identifiers and three nested objects: card, merchant, and transaction.

General information​

FieldDescriptionTypeRequired/Optional
customerHashIdUnique customer identifier generated when the customer is created.UUIDRequired

Card information (card)​

FieldDescriptionTypeRequired/Optional
maskedCardNumberMasked card number, for example 4611-35xx-xxxx-1234.StringRequired
cardHashIdUnique card identifier generated during new or add-on card issuance.UUIDRequired
emailCustomer's email address.StringRequired
phoneNumberCustomer's phone number.StringRequired
cardExpiryBase64-encoded card expiry, encoded from the MM/YY format.StringRequired

Merchant information (merchant)​

FieldDescriptionTypeRequired/Optional
idIdentifier of the merchant performing the purchase request.StringOptional
nameMerchant name.StringRequired
mccMerchant category code describing the merchant's business.StringOptional
countryCodeMerchant country code in three-digit numeric format, for example 840.StringOptional
urlMerchant URL or application name.StringOptional

Transaction information (transaction)​

FieldDescriptionTypeRequired/Optional
amountTransaction amount with up to two decimal places.NumberRequired
currencyThree-letter ISO 4217 transaction currency code.StringRequired
timestampTransaction timestamp, for example 2026-09-29T11:59:00.000Z.StringOptional

Request example​

cURL​

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 '{
"customerHashId": "df3dfdf0-d75a-4d7e-b575-f8ed34e0fa94",
"card": {
"maskedCardNumber": "4611-35xx-xxxx-1234",
"cardHashId": "5fa34f1a-8e7a-4bb5-a010-3a07cf714534",
"email": "melissa@xyz.com",
"phoneNumber": "9834201949",
"cardExpiry": "<base64-encoded-expiry>"
},
"merchant": {
"id": "MERCHANT12345",
"name": "Test Merchant",
"mcc": "5411",
"countryCode": "840",
"url": "https://www.testmerchant.com/"
},
"transaction": {
"amount": 1.10,
"currency": "EUR",
"timestamp": "2026-09-29T11:59:00.000Z"
}
}'
note

The request example follows the nested card, merchant, and transaction structure indicated in the original guide. Confirm the exact V2 schema and the expected cardExpiry encoding with the API team. The cardExpiry value above is a placeholder, not a valid encoded expiry.

Response body​

FieldDescriptionType
respCodeCode indicating the selected authentication preference. See the authentication preference table below.String
messageDescription of the selected authentication preference. See the authentication preference table below.String

Authentication preferences​

respCodemessageDescription
00OOB OnlyOnly out-of-band (OOB) authentication is supported.
01OOB with fallback to OTP+PasscodeOOB authentication is supported, with OTP plus passcode as a fallback.
02OTP+Passcode OnlyOnly OTP plus passcode authentication is supported.
03OTP OnlyOnly OTP authentication is supported.
04OOB with fallback to OTPOOB authentication is supported, with OTP as a fallback.

Response examples​

Success response — OOB only​

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

Success response — OOB with fallback to OTP plus passcode​

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

Success response — OTP plus passcode only​

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

Success response — OTP only​

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

Success response — OOB with fallback to OTP​

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

Error responses​

The source guide does not specify HTTP error status codes, error response payloads, or timeout and retry behavior for this API. Confirm these details with the API team before documenting or implementing error-specific handling.

The respCode values 00–04 above describe authentication preferences; they are not HTTP error codes.

LLM-ready documentation:: llms.txt and llms-full.txt
Was this page helpful?