Skip to main content

Customer Service

Manages customer accounts, onboarding, document verification, and profile management.

Initiate Customer Creation

POST /v1/customers/initiate

Starts the customer creation process by sending an OTP to the provided phone number.

Request Body:

{
"phone_number": "+258830000000"
}
FieldTypeRequiredDescription
phone_numberstringYesPhone number in E.164 format

Response:

{
"object": "phone_verification_session",
"session_id": "pvs_abc12345",
"otp": "123456"
}

Verify Customer Phone

POST /v1/customers

Verifies the customer's phone number using the OTP code and creates the customer account.

Request Body:

{
"session_id": "pvs_abc12345",
"verification_code": "123456"
}
FieldTypeRequiredDescription
session_idstringYesSession ID from initiation (pattern: pvs_*)
verification_codestringYes6-digit OTP code

Response:

{
"object": "verification",
"customer_id": "cus_abc12345",
"verified": true
}

Get Customer

GET /v1/customers/{id}

Retrieves customer details by ID.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID (pattern: usr_*)

Response:

{
"object": "customer",
"customer": {
"customer_id": "cus_abc12345",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+258830000000",
"address": {
"street": "Av. Julius Nyerere",
"city": "Maputo",
"country": "Mozambique",
"postal_code": "1100"
},
"nationality": "Mozambican",
"sex": "M",
"date_of_birth": "1990-01-15T00:00:00Z",
"customer_segment": "personal",
"kyc_status": "verified",
"status": "active",
"nationality_id": "***encrypted***",
"tax_id": "***encrypted***",
"nuib": "***encrypted***",
"profile_picture": {
"file_id": "file_123",
"file_bucket": "profiles",
"file_link": "/files/profiles/file_123"
},
"qrcode_id": "qr_abc123",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-06-15T10:30:00Z"
}
}

Update Customer

PUT /v1/customers/{id}

Updates customer details. Only provided fields are updated.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID (pattern: usr_*)

Request Body:

{
"first_name": "John",
"last_name": "Doe",
"email": "newemail@example.com",
"business_name": "Doe Enterprises",
"tax_id": "123456789",
"address": "Av. Julius Nyerere^Maputo^Mozambique",
"qrcode_id": "qr_abc123"
}
FieldTypeRequiredDescription
first_namestringNoCustomer's first name
last_namestringNoCustomer's last name
emailstringNoEmail address
business_namestringNoBusiness name (for business accounts)
tax_idstringNoTax ID (encrypted at rest)
addressstringNoFormatted as street^city^country
qrcode_idstringNoQR code identifier

Response:

{
"object": "customer",
"customer": { ... }
}

Delete Customer

DELETE /v1/customers/{id}

Deletes a customer from the system.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID (pattern: usr_*)

Response:

{
"object": "customer"
}

List Customers

GET /v1/customers

Lists all customers with pagination.

Query Parameters:

ParameterTypeDefaultDescription
page_sizeinteger50Max results per page (max: 100)
page_tokenstring-Token for next page

Response:

{
"object": "list",
"data": [
{
"customer_id": "cus_abc12345",
"first_name": "John",
"last_name": "Doe",
...
}
],
"has_more": true,
"next_page_token": "token_xyz"
}

Upload ID Document

POST /v1/customers/{id}/upload-document

Uploads an identity document for KYC verification. Uses multipart/form-data.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID (pattern: usr_*)

Request Body (multipart/form-data):

FieldTypeRequiredDescription
doc_typestringYesDocument type code (from supported docs endpoint)
image1fileYesFront of the document
image2fileConditionalBack of the document (required if hasBack=true)

Response:

{
"name": "John Doe",
"date_of_birth": "1990-01-15",
"id_number": "ABC123456",
"issued_at": "2020-01-01",
"expires_at": "2030-01-01",
"address": "Av. Julius Nyerere, Maputo",
"reference": "ref_abc123",
"image1": "base64_encoded_image",
"image2": "base64_encoded_image"
}

The reference field must be used when uploading the selfie in the next step.


Upload Selfie

POST /v1/customers/{id}/upload-selfie

Uploads a selfie for liveness detection and face matching against the ID document. Uses multipart/form-data.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID (pattern: usr_*)

Request Body (multipart/form-data):

FieldTypeRequiredDescription
imagefileYesSelfie image
referencestringYesReference from document upload step

Response:

{
"status": true,
"result": null,
"description": null
}

If verification fails:

{
"status": false,
"result": "match",
"description": "Face does not match the document photo"
}
Result ValueMeaning
liveSelfie is not from a live person
matchFace does not match the document
processingError processing the image

Change Profile Picture

POST /v1/customers/{id}/profile/picture

Changes the customer's profile picture. Uses multipart/form-data.

Path Parameters:

ParameterTypeDescription
idstringCustomer ID

Request Body (multipart/form-data):

FieldTypeRequiredDescription
imagefileYesNew profile picture

Response:

{
"object": "customer",
"customer": { ... }
}

Get Receiver Data

GET /v1/customers/get-receiver/{phone_number}

Retrieves basic receiver information by phone number (used for transfers).

Path Parameters:

ParameterTypeDescription
phone_numberstringReceiver's phone number

Response:

{
"phone_number": "+258830000001",
"first_name": "Jane",
"last_name": "Smith",
"sex": "F",
"id": "cus_def67890",
"profile_picture": {
"file_id": "file_456",
"file_bucket": "profiles",
"file_link": "/files/profiles/file_456"
}
}