Customers
- get/v1/customersList customers
- post/v1/customersCreate a customer
- get/v1/customers/{id}A customer with their payment totals
List customers
get/v1/customers
Parameters
limitintegerin query1 to 100 · default 20
starting_afterstring (uuid)in queryThe id of the last item on the previous page.
emailstringin querybash
curl https://sandbox.api.biftpay.com/v1/customers \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKobject
Fields
object"list"requireddataarray of CustomerrequiredFields of data
idstring (uuid)requiredobject"customer"requiredlivemodebooleanrequiredemailstring | nullnamestring | nullphonestring | nullcreated_atstring (date-time)requiredhas_moreboolean
Create a customer
post/v1/customers
Customers are also created automatically from a payment's customer_email.
Parameters
Idempotency-Keystringin headerrequiredA unique key per logical request, for example a UUID. Up to 255 characters.
up to 255 characters
Body
emailstring (email)namestringup to 200 characters
phonestringbash
curl -X POST https://sandbox.api.biftpay.com/v1/customers \
-H "Authorization: Bearer bp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Responses
- 201OKCustomer
Fields
idstring (uuid)requiredobject"customer"requiredlivemodebooleanrequiredemailstring | nullnamestring | nullphonestring | nullcreated_atstring (date-time)required - 400Invalid request
- 409The object is in a state that doesn't allow this
A customer with their payment totals
get/v1/customers/{id}
Parameters
idstring (uuid)in pathrequiredbash
curl https://sandbox.api.biftpay.com/v1/customers/{id} \
-H "Authorization: Bearer bp_test_..."Responses
- 200OKobject
Fields
idstring (uuid)requiredobject"customer"requiredlivemodebooleanrequiredemailstring | nullnamestring | nullphonestring | nullcreated_atstring (date-time)requiredpaymentsintegerrequiredSucceeded payments in every currency
total_spentintegerrequiredNaira only (kept for older clients). Use
spentfor every currency.at least 0
spentarray of objectrequiredSucceeded payments per currency, naira first. Empty if none.
Fields of spent
currencyNGN | USDrequiredpaymentsintegerrequiredamountintegerrequiredMinor units (kobo, cents).
at least 0
- 404Not found, or not visible to this key