Card Holder
All the necessary APIs to manage cardholder.
Get cardholder
Use this API to view a cardholder's profile.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cardholder/get_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cardholder/get_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cardholder/get_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cardholder/get_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cardholder/get_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: successful.
{
"status": "success",
"message": "Successful",
"data": {
"address": {
"address": "4 Adedibu Street",
"city": "Ikeji",
"country": "Nigeria",
"house_no": "4",
"postal_code": "100011",
"state": "Lagos"
},
"cardholder_id": "46b34249d13048f48cd621142573060e",
"created_at": 1705741593,
"email_address": "Johndoe@gmail.com",
"first_name": "John",
"identity_details": {
"blacklisted": false,
"date_of_birth": "1999-02-04",
"first_name": "John",
"gender": "Male",
"id_no": "22222222222",
"id_type": "NIGERIAN_NIN",
"last_name": "Doe",
"phone": "08012345678"
},
"is_active": true,
"is_id_verified": true,
"issuing_app_id": "f5853b70-ddb8-446d-b4d3-16c6e82604d0",
"last_name": "Doe",
"meta_data": {
"any_key": "any_value"
},
"phone": "2348012345678"
}
}
is_active (bool) : When this value is
True
this means the cardholder can be issued a card.
is_id_verified (bool) : Shows you whether the user has passed ID verification
if the user failed the ID verification step, is_active
and is_id_verified
will be set to False
and you cannot issue the user a card.
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Get all cardholders
Use this API to view all cardholder's profiles.
curl --location 'https://business-api-testnet.palremit.com/core/issuing/cardholder/get_all_cardholder?page=1' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cardholder/get_all_cardholder?page=1"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cardholder/get_all_cardholder?page=1"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cardholder/get_all_cardholder?page=1');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cardholder/get_all_cardholder?page=1"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
🟢 200: cardholder details fetched successfully.
{
"status": "success",
"message": "cardholder details fecthed successfully.",
"data": {
"address": {
"address": "9 Jibowu Street",
"city": "Aba North",
"country": "nigeria",
"house_no": "13",
"lga": "Aba North",
"postal_code": "1000242",
"state": "Abia"
},
"cardholder_id": "d0658fedf8284207866d961e83fa",
"created_at": 1659726281,
"email_address": "Johndoe@gmail.com",
"first_name": "John",
"identity_details": {
"blacklisted": false,
"date_of_birth": "1999-02-04",
"first_name": "John",
"gender": "Male",
"id_no": "22222222222",
"id_type": "NIGERIAN_NIN",
"last_name": "Doe",
"phone": "08123456789"
},
"is_active": true,
"is_id_verified": true,
"issuing_app_id": "842352f4-8a6f-4a19-89c6-",
"last_name": "Doe",
"phone": "2348189691071"
},
"meta_data":{"user_id" : "zzz001658fedf8284207866d961e83fa"}
}
is_active (bool) : When this value is
True
this means the cardholder can be issued a card.
is_id_verified (bool) : Shows you whether the user has passed ID verification
if the user failed the ID verification step, is_active
and is_id_verified
will be set to False
and you cannot issue the user a card.
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Create cardholder
Use this API to create a cardholder.
curl --location --request PUT 'https://business-api-testnet.palremit.com/core/issuing/cardholder/register_cardholder' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data-raw '{
"first_name": "John",
"last_name": "Doe",
"address": {
"address": "4 Adedibu Street",
"city": "Karu",
"state": "Abuja",
"country": "Nigeria",
"postal_code": "961105",
"house_no": "4"
},
"phone": "08101111111",
"email_address": "johndoe@gmail.com",
"identity": {
"id_type": "NIGERIAN_NIN",
"id_no": "70450312123",
"id_image": "https://url.kyc",
"bvn": "22222222222"
},
"meta_data": {
"any_key": "any_value"
}
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/issuing/cardholder/register_cardholder"
payload = json.dumps({
"first_name": "John",
"last_name": "Doe",
"address": {
"address": "4 Adedibu Street",
"city": "Karu",
"state": "Abuja",
"country": "Nigeria",
"postal_code": "961105",
"house_no": "4"
},
"phone": "08101111111",
"email_address": "johndoe@gmail.com",
"identity": {
"id_type": "NIGERIAN_NIN",
"id_no": "70450312123",
"id_image": "https://url.kyc",
"bvn": "22222222222"
},
"meta_data": {
"any_key": "any_value"
}
})
headers = {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'PUT',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cardholder/register_cardholder',
'headers': {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
},
body: JSON.stringify({
"first_name": "John",
"last_name": "Doe",
"address": {
"address": "4 Adedibu Street",
"city": "Karu",
"state": "Abuja",
"country": "Nigeria",
"postal_code": "961105",
"house_no": "4"
},
"phone": "08101111111",
"email_address": "johndoe@gmail.com",
"identity": {
"id_type": "NIGERIAN_NIN",
"id_no": "70450312123",
"id_image": "https://url.kyc",
"bvn": "22222222222"
},
"meta_data": {
"any_key": "any_value"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cardholder/register_cardholder');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'accept' => 'application/json',
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "first_name": "John",
\n "last_name": "Doe",
\n "address": {
\n "address": "4 Adedibu Street",
\n "city": "Karu",
\n "state": "Abuja",
\n "country": "Nigeria",
\n "postal_code": "961105",
\n "house_no": "4"
\n },
\n "phone": "08101111111",
\n "email_address": "johndoe@gmail.com",
\n "identity": {
\n "id_type": "NIGERIAN_NIN",
\n "id_no": "70450312123",
\n "id_image": "https://url.kyc",
\n "bvn": "22222222222"
\n },
\n "meta_data": {
\n "any_key": "any_value"
\n }
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cardholder/register_cardholder"
method := "PUT"
payload := strings.NewReader(`{`+"
"+`
"first_name": "John",`+"
"+`
"last_name": "Doe",`+"
"+`
"address": {`+"
"+`
"address": "4 Adedibu Street",`+"
"+`
"city": "Karu",`+"
"+`
"state": "Abuja",`+"
"+`
"country": "Nigeria",`+"
"+`
"postal_code": "961105",`+"
"+`
"house_no": "4"`+"
"+`
},`+"
"+`
"phone": "08101111111",`+"
"+`
"email_address": "johndoe@gmail.com",`+"
"+`
"identity": {`+"
"+`
"id_type": "NIGERIAN_NIN",`+"
"+`
"id_no": "70450312123",`+"
"+`
"id_image": "https://url.kyc",`+"
"+`
"bvn": "22222222222"`+"
"+`
},`+"
"+`
"meta_data": {`+"
"+`
"any_key": "any_value"`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Body
first_name : String *required
last_name : String *required
address : String *required
phone : Strings *required
email_address : String *required
identity : String *required
meta_data : String *required
Response
🟢 200: successful.
{
"status": "success",
"message": "Cardholder created successfully",
"data": {
"cardholder_id": "46b34249d13048f48cd621142573060e"
}
🔴 400: Invalid Cardholder ID
{
"status": "error",
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
Delete cardholder
Use this API to delete a cardholder.
curl --location --request DELETE 'https://business-api-testnet.palremit.com/core/issuing/cardholder/delete_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040' \
--header 'Authorization: Bearer xxxxx'
import requests
url = "https://business-api-testnet.palremit.com/core/issuing/cardholder/delete_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://business-api-testnet.palremit.com/core/issuing/cardholder/delete_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/issuing/cardholder/delete_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/issuing/cardholder/delete_cardholder?cardholder_id=0e357341429042f8a3062ed0902a0040"
method := "DELETE"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Last updated