Setup
Initializes the payer authentication process and obtains the necessary tokens for the 3D Secure flow.
Endpoint Details
Method: POST
URL: /v1/risk/authentication/setup
Purpose: Initialize authentication and obtain secure communication tokens
Headers
Content-Type: application/json
x-api-key: <YOUR_API_KEY>Request Body
{
"transaction_info": {
"type": "setup",
"reference_code": "d47f5455-0282-46c7-b1fc-eaf7ac0d85bf"
},
"card": {
"number": "4000000000002701",
"expiration_date": "01/2027"
}
}Parameters
transaction_info.type
string
Yes
Must be "setup"
transaction_info.reference_code
string
Yes
Unique transaction reference code
card.number
string
Yes
Card number (token or plain number)
card.expiration_date
string
Yes
Card expiration date (tokenized or MM/YY format)
Card Information Formats
Card Number Formats
Permanent Token:
"{{token_id : detokenize}}"- For stored card tokensTemporal Token:
"{{temp_token_id : transaction}}"- For one-time use tokensPlain Card Number:
"4111111111111111"- Card number string
Expiration Date Formats
Tokenized:
"{{temp_token_id : transaction}}"- When using tokensPlain Format:
"01/25"- MM/YY format
Response Structure
The API returns a standardized response:
status: string - "success", "fail" or "error"
message: string - Short description about the status
data: object - Authentication information and transaction details
Response Examples
Response Fields
transaction_info
type
Always "setup_auth_response"
transactiod_id
Unique transaction identifier
reference_code
Your original reference code
request_id
Unique request identifier
status
"Completed" for success, "Expired_card" for card errors
created_at
ISO 8601 timestamp of creation
consumer_auth_info
access_token
JWT token for secure communication
device_data_collection_url
URL for Cardinal device data collection
reference_id
Reference ID for the authentication session
token
Token to be used in the check enrollment step
error_info (when applicable)
reason
Error code
message
Detailed error description
Usage Example
cURL
Next Steps
After a successful setup:
Implement Cardinal SDK: Use the
device_data_collection_urlto collect device dataProceed to Check Enrollment: Use the
reference_idandtokenin the next API callStore Session Data: Keep the authentication tokens for the enrollment step
Last updated
Was this helpful?