Cardholders
One of your users, checked against their BVN or NIN before any card is issued.
curl https://api.paymonetra.com/v1/cardholders \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"reference": "user-1001",
"first_name": "Tunde",
"last_name": "Bakare",
"dob": "1990-05-14",
"phone": "08031234567",
"email": "tunde@example.com",
"address": {
"line1": "12 Allen Avenue",
"city": "Ikeja",
"state": "Lagos",
"postal_code": "100271"
},
"id_type": "bvn",
"id_number": "22222222222"
}'const url = 'https://api.paymonetra.com/v1/cardholders'
const response = await fetch(url, {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PAYMONETRA_SECRET_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'user-1001',
first_name: 'Tunde',
last_name: 'Bakare',
dob: '1990-05-14',
phone: '08031234567',
email: 'tunde@example.com',
address: {
line1: '12 Allen Avenue',
city: 'Ikeja',
state: 'Lagos',
postal_code: '100271',
},
id_type: 'bvn',
id_number: '22222222222',
}),
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)$ch = curl_init('https://api.paymonetra.com/v1/cardholders');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('PAYMONETRA_SECRET_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'reference' => 'user-1001',
'first_name' => 'Tunde',
'last_name' => 'Bakare',
'dob' => '1990-05-14',
'phone' => '08031234567',
'email' => 'tunde@example.com',
'address' => [
'line1' => '12 Allen Avenue',
'city' => 'Ikeja',
'state' => 'Lagos',
'postal_code' => '100271',
],
'id_type' => 'bvn',
'id_number' => '22222222222',
]),
]);
$result = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['message']);
}{
"cardholder_ref": "chd_51c0e9a3f7d2b8",
"reference": "user-1001",
"first_name": "Tunde",
"middle_name": "",
"last_name": "Bakare",
"phone": "08031234567",
"email": "tunde@example.com",
"id_type": "bvn",
"id_last4": "2222",
"status": "verified",
"can_hold": { "naira": true, "dollar": true },
"active_cards": 0,
"verified_at": "...",
"created_at": "..."
}#What is checked
Every card belongs to a cardholder: one of your users, whose BVN or NIN we check before any card is issued. The check is charged from your NGN balance when it gives an answer, and never when it can't be run.
- The first and last name must match the BVN or NIN. The name and date of birth are stored as the record has them, whatever was sent, and the record must show the person is 18 or older.
- Send the cardholder's own Nigerian mobile number. It does not have to be the one registered to the BVN or NIN. Card texts, such as the PIN, go to it.
- We may decline a person without giving a reason:
422 cardholder_refused. Nothing is charged. - Send a real home address. Card networks check it.
- Cardholders must be 18 or older.
- Dollar cards need a BVN. A NIN cardholder has
can_hold.dollar: false. - Same person again under a new reference:
409 cardholder_exists, with theircardholder_ref. Nothing is charged.
#Reading them back
GET /cardholders/{cardholder_ref} and GET /cardholders?reference= read them back.
id_last4 is all that comes back of the number you sent. The full one never does.
A 503 identity_check_unavailable is free: nothing is charged when the check cannot be run. What one costs when it answers is on card prices.