Skip to main content

Create Cardholder 3DS Contact

Overview

Cardholder contact information is required to enroll a card for 3D Secure authentication. A 3D Secure transaction prompts the cardholder to enter an OTP (One-Time Password) sent to their email or mobile device. Use this endpoint to set up the email and mobile contact to receive the OTP.

NOTE: This API is offered on a client-by-client approval basis. Speak to your account manager to check eligibility.

Resource Access

Production (api.ahrvo.network)

POST https://api.ahrvo.network/card/issuance/api/issuing/cardholders/v2/create

Staging (gateway.ahrvo.network)

POST https://gateway.ahrvo.network/card/issuance/api/issuing/cardholders/v2/create

Request Headers

HeaderValueRequiredDescription
Acceptapplication/jsonYesContent type for the response
AuthorizationBearer {access_token}YesBearer token for authentication
x-api-keyAPI KeyYesAPI key for authentication
Content-Typeapplication/jsonYesRequest body content type

Request Body

The request body should contain a JSON object with the following structure:

{
"budget_id": "ci202008281528472924",
"first_name": "Emma",
"last_name": "Johnson",
"call_prefix": "+1",
"mobile": "2125551234",
"email": "emma.johnson@example.com",
"date_of_birth": "1996-10-31",
"state": "Illinois",
"city": "Chicago",
"address_line": "456 Maple Avenue",
"post_code": "60601",
"country_code": "US",
"security_index": "2",
"security_answer": "Han"
}

Request Fields

FieldTypeRequiredDescription
budget_idstringYesID of the budget account this cardholder associates with
first_namestringYesFirst name of the cardholder
last_namestringYesLast name of the cardholder
call_prefixstringYesCountry code of the mobile. Supported: +61, +1, +44, +852, +81, +82, +65, +90, +86, +33
mobilestringYesMobile number of the cardholder, without country code
emailstringYesEmail of the cardholder
date_of_birthstringYesDate of birth of the cardholder (YYYY-MM-DD)
statestringYesState of the cardholder
citystringYesCity of the cardholder
address_linestringYesAddress of the cardholder
post_codestringYesPost code of the cardholder
country_codestringYesCountry of the cardholder in ISO 3166 format (e.g., US)
security_indexstringYesIndex of security question (1-5)
security_answerstringYesAnswer to the security question

Security Questions

The security_index field corresponds to the following questions:

IndexSecurity Question
1What was your first pet's name?
2What is your maternal grandmother's maiden name?
3What is the name of your favourite childhood friend?
4What was the make of your first car?
5In what city or town did your mother and father meet?

Supported Country Codes (call_prefix)

  • +1 - United States, Canada
  • +33 - France
  • +44 - United Kingdom
  • +61 - Australia
  • +65 - Singapore
  • +81 - Japan
  • +82 - South Korea
  • +86 - China
  • +90 - Turkey
  • +852 - Hong Kong

Response

Success Response (200 OK)

{
"code": "SUCCESS",
"data": {
"cardholder_id": "471041678120300545"
}
}

Response Fields

FieldTypeDescription
codestringStatus string indicating the result. "SUCCESS" refers to successful cardholder creation
dataobjectResponse data object
data.cardholder_idstringUnique ID of the created cardholder

Error Responses

  • 400 Bad Request: Invalid input data (invalid email format, missing required fields)
  • 401 Unauthorized: Invalid or missing authentication token
  • 403 Forbidden: API not enabled for this account
  • 409 Conflict: Cardholder already exists for this budget account

Code Examples

cURL

curl -X POST \
'https://gateway.ahrvo.network/card/issuance/api/issuing/cardholders/v2/create' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"budget_id": "ci202008281528472924",
"first_name": "Emma",
"last_name": "Johnson",
"call_prefix": "+1",
"mobile": "2125551234",
"email": "emma.johnson@example.com",
"date_of_birth": "1996-10-31",
"state": "Illinois",
"city": "Chicago",
"address_line": "456 Maple Avenue",
"post_code": "60601",
"country_code": "US",
"security_index": "2",
"security_answer": "Han"
}'

Python

import requests

url = "https://gateway.ahrvo.network/card/issuance/api/issuing/cardholders/v2/create"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"budget_id": "ci202008281528472924",
"first_name": "Emma",
"last_name": "Johnson",
"call_prefix": "+1",
"mobile": "2125551234",
"email": "emma.johnson@example.com",
"date_of_birth": "1996-10-31",
"state": "Illinois",
"city": "Chicago",
"address_line": "456 Maple Avenue",
"post_code": "60601",
"country_code": "US",
"security_index": "2",
"security_answer": "Han"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

JavaScript (Node.js)

const axios = require('axios');

const url = 'https://gateway.ahrvo.network/card/issuance/api/issuing/cardholders/v2/create';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
const data = {
budget_id: 'ci202008281528472924',
first_name: 'Emma',
last_name: 'Johnson',
call_prefix: '+1',
mobile: '2125551234',
email: 'emma.johnson@example.com',
date_of_birth: '1996-10-31',
state: 'Illinois',
city: 'Chicago',
address_line: '456 Maple Avenue',
post_code: '60601',
country_code: 'US',
security_index: '2',
security_answer: 'Han'
};

axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response.data);
});

Usage Notes

  • 3D Secure Enrollment: This endpoint creates the cardholder profile required for 3D Secure authentication
  • OTP Delivery: The email and mobile number will be used to send OTP codes during 3DS authentication
  • Security Questions: Choose a security question and answer that the cardholder can easily remember
  • Data Privacy: Ensure all personal information is collected with proper consent
  • Account Approval: This feature requires explicit approval from your account manager
  • One Cardholder per Budget: Each budget account can have one associated cardholder for 3DS

3D Secure Authentication Flow

  1. Create Cardholder: Use this endpoint to register cardholder contact information
  2. Enroll Card: Associate the cardholder with a card for 3DS authentication
  3. Transaction Initiated: When a 3DS transaction occurs, an OTP is sent to the registered email/mobile
  4. Cardholder Verification: Cardholder enters the OTP to complete the transaction
  5. Transaction Completed: Upon successful verification, the transaction is processed

Best Practices

  • Verify Contact Information: Ensure email and mobile number are valid and belong to the cardholder
  • Secure Storage: Store the cardholder_id securely for future reference
  • Update Information: Provide a way for cardholders to update their contact information
  • Test in Sandbox: Test the complete 3DS flow in sandbox environment before going live
  • Handle Errors: Implement proper error handling for failed cardholder creation
  • Update Cardholder Contact - Update existing cardholder information
  • Get Cardholder Details - Retrieve cardholder information
  • Enroll Card for 3DS - Associate a card with the cardholder

Interactive API Explorer