Skip to main content

Customers API

Create, verify, and manage customers on your Payscribe account.


Create Customer (Basic)

Create a new customer on your integration with basic details.

POST /customers/create

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
first_namestringYesCustomer's first name.
last_namestringYesCustomer's last name.
emailstringYesCustomer's email address.
phonestringYesCustomer's phone number.

Request

curl -X POST https://sandbox.payscribe.ng/api/v1/customers/create \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "2348012345678"
}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer created successfully.",
"message": {"details": {
"customer_id": "cus_xyz789",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "2348012345678",
"country": "NG",
"tier": 0,
"created_at": "2026-08-28 12:00:00"
}},
"status_code": 200
}

Add Customer Profile and Address

Add the customer's date of birth, address, and identification details. The address must be a JSON object; this endpoint supports both POST and PATCH.

PATCH /customers/create/tier1

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
customer_idstringYesThe ID of the customer to update.
dobstringYesDate of birth in YYYY-MM-DD format.
addressobjectYesAddress object with street, city, state, country, and postal_code.
identification_typestringYesIdentification type, for example bvn or nin.
identification_numberstringYesIdentification number.
photostringNoIdentity-document image URL or encoded value.

Request

curl -X PATCH https://sandbox.payscribe.ng/api/v1/customers/create/tier1 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_xyz789",
"dob": "1990-01-15",
"address": {"street": "12 Broad Street", "city": "Lagos", "state": "Lagos", "country": "NG", "postal_code": "100001"},
"identification_type": "bvn",
"identification_number": "12345678901"
}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer details updated successfully.",
"message": {"details": {"customer_id": "cus_xyz789"}},
"status_code": 200
}

Add Customer Identity Document

Add an identity document to an existing customer. The identity value must be a JSON object; this endpoint supports both POST and PATCH.

PATCH /customers/create/tier2

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
customer_idstringYesThe ID of the customer to update.
identityobjectYesIdentity object with type, number, and image; country defaults to NG.

Request

curl -X PATCH https://sandbox.payscribe.ng/api/v1/customers/create/tier2 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_xyz789",
"identity": {"type": "nin", "number": "12345678901", "image": "https://example.com/identity-document.jpg", "country": "NG"}
}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer details updated successfully.",
"message": {"details": {"customer_id": "cus_xyz789"}},
"status_code": 200
}

Create Customer (Full)

Create and fully onboard a customer in one call with all KYC details.

POST /customers/create/full

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
first_namestringYesCustomer's first name.
last_namestringYesCustomer's last name.
emailstringYesCustomer's email address.
phonestringYesCustomer's phone number.
countrystringYesTwo-letter customer country code, for example NG.
dobstringYesDate of birth in YYYY-MM-DD format.
addressobjectYesAddress object with street, city, state, country, and postal_code.
identification_typestringYesIdentification type, for example nin.
identification_numberstringYesIdentification number.
identityobjectYesIdentity object with type, number, and document image.

Request

curl -X POST https://sandbox.payscribe.ng/api/v1/customers/create/full \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "2348012345678",
"country": "NG",
"dob": "1990-01-15",
"address": {"street": "12 Broad Street", "city": "Lagos", "state": "Lagos", "country": "NG", "postal_code": "100001"},
"identification_type": "nin",
"identification_number": "12345678901",
"identity": {"type": "nin", "number": "12345678901", "image": "https://example.com/identity-document.jpg", "country": "NG"}
}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer created successfully.",
"message": {"details": {
"customer_id": "cus_xyz789",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "2348012345678",
"country": "NG",
"tier": 2,
"created_at": "2026-08-28 12:00:00"
}},
"status_code": 200
}

Get Customer Details

Retrieve the details of an existing customer.

GET /customers/{id}/details

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe ID of the customer to retrieve.

Request

curl -X GET https://sandbox.payscribe.ng/api/v1/customers/cus_xyz789/details \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

Status: 200 OK

{
"status": true,
"description": "Customer details fetched.",
"message": {
"details": {
"customer_id": "cus_xyz789",
"first_name": "John",
"last_name": "Doe",
"phone": "2348012345678",
"email": "john@example.com",
"dob": "1990-01-15",
"identification_number": "12345678901",
"identity": {"type": "nin", "number": "12345678901", "image": "https://example.com/identity-document.jpg", "country": "NG"},
"address": {"street": "12 Broad Street", "city": "Lagos", "state": "Lagos", "country": "NG", "postal_code": "100001"},
"access": {
"can_create_card": true,
"can_create_account": true,
"can_save": true
},
"accounts": [
{
"account": "1234567890",
"currency": "NGN",
"bank": "9 Payment Service Bank",
"account_type": "static",
"created_at": "2025-06-20 10:30:00",
"status": "active"
}
],
"country": "NG",
"status": "active",
"created_at": "2025-06-20 10:30:00",
"updated_at": "2025-06-20 11:15:00"
}
},
"status_code": 200
}

There is no id, customer_code, tier, identified, bvn, id_type/id_number, total_transactions, or total_transaction_value field on this endpoint. access reflects what the customer is currently eligible for based on whether they have an address and identity on file and an active status; accounts lists their virtual accounts, if any.


Lookup Customer by Email or Phone

Look up a customer's details using their email address or phone number in the username field.

POST /customers/details

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
usernamestringYesCustomer's email address or phone number.

Request

curl -X POST https://sandbox.payscribe.ng/api/v1/customers/details \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "john@example.com"
}'
Known issue

Calling this endpoint currently returns 400 The source field is required. regardless of a valid payload — a server-side defect, not a documentation error. Use Get Customer Details (GET /customers/{id}/details) until this is fixed.

Response

Status: 200 OK

This endpoint shares its implementation with Get Customer Details, so once the known issue above is resolved it returns the same shape:

{
"status": true,
"description": "Customer details fetched.",
"message": {
"details": {
"customer_id": "cus_xyz789",
"first_name": "John",
"last_name": "Doe",
"phone": "2348012345678",
"email": "john@example.com",
"dob": "1990-01-15",
"identification_number": "12345678901",
"identity": {"type": "nin", "number": "12345678901", "image": "https://example.com/identity-document.jpg", "country": "NG"},
"address": {"street": "12 Broad Street", "city": "Lagos", "state": "Lagos", "country": "NG", "postal_code": "100001"},
"access": {
"can_create_card": true,
"can_create_account": true,
"can_save": true
},
"accounts": [],
"country": "NG",
"status": "active",
"created_at": "2025-06-20 10:30:00",
"updated_at": "2025-06-20 11:15:00"
}
},
"status_code": 200
}

Blacklist Customer

Blacklist a customer to restrict their activities on your integration.

POST /customers/blacklist

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be set to application/json.

Body Parameters

ParameterTypeRequiredDescription
customer_idstringYesThe ID of the customer to update.
blacklistintegerYesUse 1 to blacklist or 0 to reactivate the customer.

Request

curl -X POST https://sandbox.payscribe.ng/api/v1/customers/blacklist \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_xyz789",
"blacklist": 1
}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer details updated successfully.",
"message": {"details": {"customer_id": "cus_xyz789"}},
"status_code": 200
}

Get Customer Transactions

Retrieve all transactions for a specific customer.

POST /customers/{id}/transactions

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe ID of the customer.

Body Parameters

ParameterTypeRequiredDescription
start_datestringYesStart date in YYYY-MM-DD; must be in the same month as end_date.
end_datestringYesEnd date in YYYY-MM-DD.
pageintegerYesPage number, for example 1.
page_sizeintegerYesNumber of records per page, for example 20.

Request

curl -X POST https://sandbox.payscribe.ng/api/v1/customers/cus_xyz789/transactions \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"start_date":"2026-08-01","end_date":"2026-08-28","page":1,"page_size":20}'

Response

Status: 200 OK

{
"status": true,
"description": "Customer transactions fetched.",
"message": {
"details": {
"transactions": [
{
"trans_id": "TXN-2026080101",
"ref": "ref_abc123",
"amount": 5000,
"fee": 50,
"currency": "NGN",
"description": "Card top-up",
"service": "CARDS",
"service_id": "card_abc123",
"created_at": "2026-08-01 10:00:00",
"status": "success"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
},
"status_code": 200
}

The row array is transactions, not data, and a total count is included alongside page/page_size.


List All Customers

Retrieve a paginated list of all customers on your integration.

GET /customers/

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number to retrieve. Defaults to 1.
page_sizeintegerNoNumber of records per page. Defaults to 10.

Request

curl -X GET "https://sandbox.payscribe.ng/api/v1/customers/?page=1&page_size=10" \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

Status: 200 OK

{
"status": true,
"description": "Customers Fetched successfully.",
"message": {
"details": {
"customers": [
{
"customer_id": "cus_xyz789",
"name": "John Doe",
"email": "john@example.com",
"status": "active"
},
{
"customer_id": "cus_abc456",
"name": "Jane Smith",
"email": "jane@example.com",
"status": "active"
}
],
"total": 2,
"page": 1,
"page_size": 10
}
},
"status_code": 200
}

The list is nested at message.details.customers, alongside total/page/page_size in the same object — there is no top-level meta key. Each row is {customer_id, name, email, status} only — name is not split into first_name/last_name, and there is no id, customer_code, phone, tier, identified, or created_at on this endpoint (use Get Customer Details for those).


Webhooks

EventDescription
customers.createdA new customer was created on your integration.
customers.updateAn existing customer's details were updated.

See Webhooks for payload format and signature verification.

Was this page helpful?

Report a docs issue →