Get Customer by ID
curl --request GET \
--url https://api-production.fossapay.com/api/v1/customers/{customerId} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-production.fossapay.com/api/v1/customers/{customerId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api-production.fossapay.com/api/v1/customers/{customerId}', 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-production.fossapay.com/api/v1/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-production.fossapay.com/api/v1/customers/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-production.fossapay.com/api/v1/customers/{customerId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-production.fossapay.com/api/v1/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"statusCode": 200,
"message": "Customer retrieved successfully",
"data": {
"id": "fh8e2e1f-e253-23ac-b8ft-31ed2t7fb0df",
"businessId": "xse5f9867-f6b3-4dda-9d1e-aa335fbf7a3a",
"firstName": "John",
"lastName": "Ben",
"middleName": "Doe",
"emailAddress": "john.doe@gmail.com",
"mobileNumber": "0918458251",
"dob": "1991-08-15",
"customerType": "individual",
"address": "12 customer rd.",
"city": "Lagos",
"createdAt": "2021-01-08T21:39:52+01:00"
}
}
{
"status": "error",
"statusCode": 401,
"message": "Invalid API key"
}
{
"status": "error",
"statusCode": 404,
"message": "Customer not found"
}
Customers
Get Customer by ID
Retrieve a specific customer by their ID
GET
/
api
/
v1
/
customers
/
{customerId}
Get Customer by ID
curl --request GET \
--url https://api-production.fossapay.com/api/v1/customers/{customerId} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-production.fossapay.com/api/v1/customers/{customerId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api-production.fossapay.com/api/v1/customers/{customerId}', 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-production.fossapay.com/api/v1/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-production.fossapay.com/api/v1/customers/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-production.fossapay.com/api/v1/customers/{customerId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-production.fossapay.com/api/v1/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"statusCode": 200,
"message": "Customer retrieved successfully",
"data": {
"id": "fh8e2e1f-e253-23ac-b8ft-31ed2t7fb0df",
"businessId": "xse5f9867-f6b3-4dda-9d1e-aa335fbf7a3a",
"firstName": "John",
"lastName": "Ben",
"middleName": "Doe",
"emailAddress": "john.doe@gmail.com",
"mobileNumber": "0918458251",
"dob": "1991-08-15",
"customerType": "individual",
"address": "12 customer rd.",
"city": "Lagos",
"createdAt": "2021-01-08T21:39:52+01:00"
}
}
{
"status": "error",
"statusCode": 401,
"message": "Invalid API key"
}
{
"status": "error",
"statusCode": 404,
"message": "Customer not found"
}
Overview
Retrieve detailed information about a specific customer using their unique customer ID.Request
Your API key for authentication
The unique identifier of the customer
Response
Response status:
success or errorHTTP status code (200 for successful retrieval)
Human-readable response message
Customer object
Response Example
{
"status": "success",
"statusCode": 200,
"message": "Customer retrieved successfully",
"data": {
"id": "fh8e2e1f-e253-23ac-b8ft-31ed2t7fb0df",
"businessId": "xse5f9867-f6b3-4dda-9d1e-aa335fbf7a3a",
"firstName": "John",
"lastName": "Ben",
"middleName": "Doe",
"emailAddress": "john.doe@gmail.com",
"mobileNumber": "0918458251",
"dob": "1991-08-15",
"customerType": "individual",
"address": "12 customer rd.",
"city": "Lagos",
"createdAt": "2021-01-08T21:39:52+01:00"
}
}
{
"status": "error",
"statusCode": 401,
"message": "Invalid API key"
}
{
"status": "error",
"statusCode": 404,
"message": "Customer not found"
}
Example
- cURL
- Node.js
curl -X GET https://api-production.fossapay.com/api/v1/customers/fh8e2e1f-e253-23ac-b8ft-31ed2t7fb0df \
-H "x-api-key: YOUR_API_KEY"
const customerId = "fh8e2e1f-e253-23ac-b8ft-31ed2t7fb0df";
const response = await fetch(
`https://api-production.fossapay.com/api/v1/customers/${customerId}`,
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
},
);
const customer = await response.json();
console.log(customer);
Rate Limits
- Maximum 100 requests per minute per API key
- Burst limit of 20 requests per second
⌘I

