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:

Step 1: Retrieve a Specific CustomerCopied!

You can fetch the details of a single customer from their ID.

To retrieve a specific customer:

  1. Open your terminal or command prompt.

  2. Construct a GET request to the /v1/customers/{customer_id} endpoint, replacing {customer_id} with the actual customer ID.

  3. Ensure your Authorization and YOUR_SECRET_TOKEN headers are included.

  4. Replace placeholders like YOUR_BASE_URL and YOUR_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:

  1. Open your terminal or command prompt.

  2. Construct a GET request to the /v1/customers endpoint.

  3. Ensure your Authorization header is included.

  4. Replace placeholders like YOUR_BASE_URL and YOUR_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: