Skip to Content
APICustomers

Customers API

Manage customers on the Afriex platform with full KYC support.

Create Customer

const customer = await afriex.customers.create({ fullName: 'John Doe', email: 'john@example.com', phone: '+1234567890', countryCode: 'US', kyc: { // Optional KYC fields }, meta: { // Optional metadata } });

Request Parameters:

FieldTypeRequiredDescription
fullNamestringCustomer’s full name
emailstringCustomer’s email address
phonestringCustomer’s phone number
countryCodestringISO country code (e.g., US, NG)
kycobject-KYC verification data
metaobject-Additional metadata

Get Customer

const customer = await afriex.customers.get('customer-id');

List Customers

const response = await afriex.customers.list({ page: 1, limit: 20 }); console.log(response.data); // Customer[] console.log(response.total); // Total count

Update KYC

const customer = await afriex.customers.updateKyc('customer-id', { kyc: { documentType: 'passport', documentNumber: 'AB123456' } });

Delete Customer

await afriex.customers.delete('customer-id');
Last updated on