What You’ll Achieve:
- Understand the basic structure for creating a customer.
- Learn how to structure API requests for individual customer types.
- Successfully create and retrieve customer accounts programmatically.
Prerequisites
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).
Creating an Individual Customer Account
1
Understand Customer Creation Parameters
The essential parameters for creating an individual customer type are:
For the
Know Your Customer (KYC)Optionally, you can choose to upload your customer’s KYC documents at the point of creation in the The For individual customers, the KYC documents required, depending on your country, are:
The document array expects the object(s) in this format:For a full list of acceptable documents, please refer to the Customer API Reference.
| Parameter | Type | Description |
|---|---|---|
email | string | The individual customer’s email address. |
has_accepted_terms | boolean | A flag indicating whether the individual has accepted your platform’s (or Busha’s) terms and conditions. |
type | string | The type of customer. Must be individual for this customer
type. |
country_id | string | The ISO 3166-1 alpha-2 country code representing the individual’s primary country of residence. |
phone | string | The individual’s phone number, including the international country code (e.g., +234 8012345678). |
birth_date | string | The individual’s date of birth, typically required for identity verification. Format likely DD-MM-YYYY. |
first_name | string | The individual customer’s first name. |
middle_name | string | The individual customer’s middle name. |
last_name | string | The individual customer’s last name. |
address | object | The individual’s physical address details. See the Address Object Parameters table below for nested fields. |
identifying_information | array | An array of objects describing the individual’s identification documents (e.g., passport, national ID). |
documents | array | An array of objects referencing uploaded documents for various purposes (e.g., proof of address). |
address field in the customer creation object, the fields required are:| Parameter | Type | Description |
|---|---|---|
city | string | The city component of the address. |
state | string | The state or region component of the address. |
county | string | The county or district component of the address (may be optional or region-specific). |
country_id | string | The ISO 3166-1 alpha-2 country code of the address. |
address_line_1 | string | The first line of the street address. |
address_line_2 | string | The second line of the street address (e.g., apartment, suite number, or building name). |
province | string | The province component of the address (may be optional or region-specific). |
postal_code | string | The postal or ZIP code of the address. |
identifying_information and documents array field in the original request body.Files uploaded for KYC must be in Base64 format and have a file size less than
4MB.
identifying_information array expects the object(s) in this format:| Country | Documents Required |
|---|---|
| Nigeria |
|
| Kenya |
|
2
Create a Customer (Without KYC Documents)
Individual customers refer to persons who engage with your services.To create an individual customer:Expected Response:A successful response will return a Customer object, providing the customer ID (
- Open your terminal or command prompt.
- Use the
POSTrequest below to the/v1/customersendpoint. - Replace
YOUR_BASE_URLwith your chosen environment’s URL and{YOUR_SECRET_KEY}with your actual key.
CUS_IL2Qf2pEoNADZ), the customer type (individual) as set in the request body and the status of the customer.The default status of a customer is
inactive until the user completes their Know-Your-Customer (KYC) process.3
Create a Customer (With KYC Documents)
You can add a customer’s KYC documents at the point of creation. Let’s create a customer with supporting KYC documents.To create a customer with supporting KYC documents:Expected Response:A successful response will return a Customer object, providing the customer ID
- Open your terminal or command prompt.
- Use the
POSTrequest below to the/v1/customersendpoint. - Replace
YOUR_BASE_URLwith your chosen environment’s URL and{YOUR_SECRET_KEY}with your actual key.
CUS_IJIpmM0RqueY6), the customer type (individual) as set in the request body and the status of the customer.The default status of a customer is
inactive until the documents uploaded are verified.Troubleshooting
- 400 Bad Request / 422 Unprocessable Entity: Review your request body to ensure all required fields are present and correctly formatted for the specified type (individual or business).
- 401 Unauthorized: Verify that your Secret API Key is correct and included in the header.
What’s Next?
Now that you can programmatically create individual customers, you can proceed to create a business customer, manage, and perform transactions on their behalf:- How to Create a Business Customer: Learn how to create a business customer in your Busha business account.
- 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_idto perform operations for your customers.