POST
/
v1
/
customers
/
{customerId}
/
accounts
/
{accountId}
/
cardholders
Create a cardholder
curl --request POST \
  --url https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "Ada",
  "lastName": "Lovelace",
  "email": "ada.lovelace@example.com",
  "dateOfBirth": "1990-12-10",
  "address": {
    "addressLine1": "12 Analytical Way",
    "addressLine2": "Floor 3",
    "city": "London",
    "state": "Greater London",
    "country": "GB",
    "postalCode": "EC1A1BB"
  }
}
'
import requests

url = "https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders"

payload = {
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada.lovelace@example.com",
"dateOfBirth": "1990-12-10",
"address": {
"addressLine1": "12 Analytical Way",
"addressLine2": "Floor 3",
"city": "London",
"state": "Greater London",
"country": "GB",
"postalCode": "EC1A1BB"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Ada',
lastName: 'Lovelace',
email: 'ada.lovelace@example.com',
dateOfBirth: '1990-12-10',
address: {
addressLine1: '12 Analytical Way',
addressLine2: 'Floor 3',
city: 'London',
state: 'Greater London',
country: 'GB',
postalCode: 'EC1A1BB'
}
})
};

fetch('https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'email' => 'ada.lovelace@example.com',
'dateOfBirth' => '1990-12-10',
'address' => [
'addressLine1' => '12 Analytical Way',
'addressLine2' => 'Floor 3',
'city' => 'London',
'state' => 'Greater London',
'country' => 'GB',
'postalCode' => 'EC1A1BB'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders"

payload := strings.NewReader("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada.lovelace@example.com\",\n \"dateOfBirth\": \"1990-12-10\",\n \"address\": {\n \"addressLine1\": \"12 Analytical Way\",\n \"addressLine2\": \"Floor 3\",\n \"city\": \"London\",\n \"state\": \"Greater London\",\n \"country\": \"GB\",\n \"postalCode\": \"EC1A1BB\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada.lovelace@example.com\",\n \"dateOfBirth\": \"1990-12-10\",\n \"address\": {\n \"addressLine1\": \"12 Analytical Way\",\n \"addressLine2\": \"Floor 3\",\n \"city\": \"London\",\n \"state\": \"Greater London\",\n \"country\": \"GB\",\n \"postalCode\": \"EC1A1BB\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/cardholders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada.lovelace@example.com\",\n \"dateOfBirth\": \"1990-12-10\",\n \"address\": {\n \"addressLine1\": \"12 Analytical Way\",\n \"addressLine2\": \"Floor 3\",\n \"city\": \"London\",\n \"state\": \"Greater London\",\n \"country\": \"GB\",\n \"postalCode\": \"EC1A1BB\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "cardholderId": "chl_8d2f4a6b",
  "message": "Cardholder created successfully"
}
{
"success": false,
"code": "VALIDATION_ERROR",
"message": "newPin must be 4 digits"
}
{
"success": false,
"code": "CARD_NOT_FOUND",
"message": "Card not found"
}
Creates a cardholder on the account. For business programs, firstName, lastName, email, and address are required; names use English letters and the combined first + last name can’t exceed 23 characters (it’s what gets embossed on the card). After creating the holder, invite them to a card.

Authorizations

Authorization
string
header
required

The user's access token. The program and environment come from the token.

Path Parameters

customerId
string
required

The customer's id.

accountId
string
required

The account the card belongs to. A customer can have several accounts; cards are issued against one.

Body

application/json
firstName
string

Conditionally required (business models). English letters; first + last name max 23 chars combined.

lastName
string

Conditionally required (business models).

email
string

Conditionally required (business models).

dateOfBirth
string<date>

Optional. YYYY-MM-DD.

address
object

Conditionally required (business models).

Response

Created

success
boolean
Example:

true

cardholderId
string
message
string
Example:

"Cardholder created successfully"