Customers
Create Single Customer

Customers API

The Customers API allows you to create and manage customers on your integration.


Create Customer

Create a customer on your integration.

Endpoint: POST https://api.budpay.com/api/v2/customer

Virtual Account Requirement: The first_name, last_name, and phone are optional parameters. However, when creating a customer that would be assigned to a Dedicated Virtual Account, these parameters become required.

Parameters

This section details the header information required for creating a customer.

Field NameDescription
URLhttps://api.budpay.com/api/v2/customer
MethodPOST
AuthorizationBearer YOUR_SECRET_KEY (Replace with your actual BudPay secret key)
Content-Typeapplication/json
Request Parameters
ParameterTypeRequiredDescription
emailStringYesCustomer's email address
first_nameStringYesCustomer's first name
last_nameStringYesCustomer's last name
phoneStringNoCustomer's phone number
metadataObjectNoKey/value pairs for additional information

Sample Request
curl https://api.budpay.com/api/v2/customer \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "zero@budpay.com",
    "first_name": "Zero",
    "last_name": "Sum",
    "phone": "+2348123456789"
  }' \
  -X POST
Sample Response
{
  "status": true,
  "message": "Customer created",
  "data": {
    "email": "zero@sum.com",
    "domain": "test",
    "customer_code": "CUS_mc85c8hzzwfyowx",
    "id": 6,
    "created_at": "2022-02-01T00:01:33.000000Z",
    "updated_at": "2022-02-01T00:01:33.000000Z"
  }
}

Try it out

Response Fields
FieldDescription
emailCustomer's email address
domainEnvironment (test or live)
customer_codeUnique customer identifier (e.g., CUS_xxxxx)
idCustomer ID in BudPay system
created_atTimestamp when customer was created