Payment Features
Bulk Customer
The Bulk Customers API allows you create and manage bulk customers on your integration.
Create Bulk Customer
Create bulk customer on your integration
Endpoint: /customer/bulk_create
Method: POST
Header
Param | Type | Required? | Decription |
---|---|---|---|
authorization | string | Yes | Set value to Bearer SECRET_KEY |
content-type | string | Yes | Set value to application/json |
Body Param
Param | Type | Required? | Decription |
---|---|---|---|
string | Yes | Customer's email address | |
first_name | string | Yes | Customer's first name |
last_name | string | Yes | Customer's last name |
phone | string | No | Customer's phone number |
Sample Post
curl https://api.budpay.com/api/v2/customer/bulk_create
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{
"customers": [
{
"email": "toluxsys@gmail.com",
"first_name": "Tolulope",
"last_name": "Oyeniyi",
"phone": "07036218209"
},
{
"email": "tolu@budpay.com",
"first_name": "Tolulope",
"last_name": "Oyeniyi",
"phone": "07036218209"
},
{
"email": "tolu@bud.africa",
"first_name": "Tolulope",
"last_name": "Oyeniyi",
"phone": "07036218209"
}
]
}'
-X POST
Sample Response
{
"status": true,
"message": "Customers processed",
"data": {
"batchid": "65c1368420424",
"totalSubmitted": 3,
"totalCreated": 3,
"totalSkipped": 0,
"domain": "test"
}
}
Get Customers By Batch ID
Get created customers using batch id on your integration
Endpoint: /customers_by_batch_id/{batchid}
Method: GET
Sample Request
curl https://api.budpay.com/api/v2/customers_by_batch_id/{batchid}
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-X GET
Sample Response
{
"status": true,
"message": "Customers retrieved",
"data": [
{
"id": 8242070,
"first_name": "Test 1",
"last_name": "Test 1",
"email": "aa@test.com",
"phone": "07036218209",
"domain": "test",
"customer_code": "CUS_3wbenswjirvtnad",
"batch_id": "65c1368420424",
"metadata": "{}",
"status": "active"
},
{
"id": 8242071,
"first_name": "Test 2",
"last_name": "Test 2",
"email": "bb@test.com",
"phone": "07036218209",
"domain": "test",
"customer_code": "CUS_r5drcnpkdo7l3sd",
"batch_id": "65c1368420424",
"metadata": "{}",
"status": "active"
},
{
"id": 8242072,
"first_name": "Test 3",
"last_name": "Test 3",
"email": "cc@test.com",
"phone": "07036218209",
"domain": "test",
"customer_code": "CUS_uaxartryqeqj8pm",
"batch_id": "65c1368420424",
"metadata": "{}",
"status": "active"
}
]
}