Retrieve Customers
After creating customers, you’ll often need to retrieve their details or get a list of all customers associated with your business account. This allows you to manage operations and ensure you’re using the correct customer_id
for transactions.
This guide provides a technical walkthrough on retrieving the customers associated with your Busha business account via the Busha API
PrerequisitesCopied!
Before you begin, ensure you have:
-
A Busha Business Account and Secret API Key (from the Quick Start Tutorial).
-
An understanding of API Environments (Sandbox vs. Production) and their base URLs (from the Make Your First Request Guide).
Step 1: Retrieve a Specific CustomerCopied!
You can fetch the details of a single customer from their ID.
To retrieve a specific customer:
-
Open your terminal or command prompt.
-
Construct a
GET
request to the/v1/customers/{customer_id}
endpoint, replacing{customer_id}
with the actual customer ID. -
Ensure your
Authorization
andYOUR_SECRET_TOKEN
headers are included. -
Replace placeholders like
YOUR_BASE_URL
andYOUR_SECRET_TOKEN
.
$ curl -i -X GET "https://YOUR_BASE_URL/v1/customers/{id}" \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
-H 'Content-Type: application/json'
Expected Response:
A successful response will return a single customer object, identical in structure to the one received during creation, containing all its details:
{
"status": "success",
"message": "Fetched customer successfully",
"data": {
"address": {
"address_line_1": "RT Lawal",
"address_line_2": "",
"city": "Lekki",
"country_id": "NG",
"county": "Mombasa",
"postal_code": "12345",
"province": "province",
"state": "Lagos"
},
"business_id": "BUS_jlKUYwF9z1ynQZ98bWbaP",
"country_id": "NG",
"created_at": "2025-06-25T22:08:08.978994Z",
"deposit": true,
"display_currency": "NGN",
"email": "trybusha@busha.so",
"first_name": "Busha",
"has_accepted_terms_of_service": true,
"id": "CUS_IL2Qf2pEoNADZ",
"last_name": "Mascot",
"middle_name": "Crypto",
"payout": true,
"phone": "+234 8012345678",
"status": "inactive",
"type": "individual",
"updated_at": "2025-06-25T22:08:08.978994Z"
}
}
Step 2: Retrieve All CustomersCopied!
To get an overview of all the customers you have created, you can make a GET
request to the /v1/customers
endpoint without specifying an ID.
To list all customers:
-
Open your terminal or command prompt.
-
Construct a
GET
request to the/v1/customers
endpoint. -
Ensure your
Authorization
header is included. -
Replace placeholders like
YOUR_BASE_URL
andYOUR_SECRET_TOKEN
.
$ curl -i -X GET 'https://YOUR_BASE_URL/v1/customers' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN'
Expected Response
A successful response will return a list (an array) of all recipient objects associated with your account.
{
"status": "success",
"message": "Fetched customers successfully",
"data": [
{
"address": {
"address_line_1": "RT Lawal",
"address_line_2": "",
"city": "Lekki",
"country_id": "NG",
"county": "Mombasa",
"postal_code": "12345",
"province": "province",
"state": "Lagos"
},
"business_id": "BUS_jlKUYwF9z1ynQZ98bWbaP",
"country_id": "NG",
"created_at": "2025-06-25T22:08:08.978994Z",
"deposit": true,
"display_currency": "NGN",
"email": "trybusha@busha.co",
"first_name": "Busha",
"has_accepted_terms_of_service": true,
"id": "CUS_IL2Qf2pEoNADZ",
"last_name": "Mascot",
"middle_name": "Crypto",
"payout": true,
"phone": "+234 8012345678",
"status": "inactive",
"type": "individual",
"updated_at": "2025-06-25T22:08:08.978994Z"
}
],
"pagination": {
"current_entries_size": 1,
"previous_cursor": "MDAwMS0wMS0wMVQwMDowMDowMFo="
}
}
TroubleshootingCopied!
-
404 Not Found
: Verify that the customer ID is correct. -
401 Unauthorized
: Verify that your Secret API Key is correct and included in the header.
What’s Next?Copied!
Now that you can retrieve customers, you can proceed to manage them and perform transactions on their behalf:
-
How to Verify Customer’s Identity (KYC/KYB): Learn how to conduct and verify the identity of your customer to allow them full access to Busha’s operations.
-
How to Initiate Transactions on Behalf of a Customer: Understand how to use the
customer_id
to perform operations for your customers.