Customers
Create reusable customers identified by email or phone to reconcile payments, pre-fill the payment page, and track history.
A Customer represents a reusable payer. Linking them to your payments gives you a consolidated history, pre-fills the payment page, and simplifies reconciliation. A customer is uniquely identified by their email or phone.
Optional but recommended
You can initialize a payment with a simple inline customer object. But creating a persistent
Customer lets you link multiple transactions to the same person.
Create a customer
https://api.wajub.com/customersemailstringoptionalphonestringoptionalnamestringoptionalmetadataobjectoptionalhttps://api.wajub.com/customerscurl https://api.wajub.com/customers \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3" \
-H "Content-Type: application/json" \
-d '{ "email": "amina@example.com", "phone": "+237670000000", "name": "Amina N." }'{
"status": "Created",
"code": 201,
"customer": { "id": "cus_7Yh2MpQ", "email": "amina@example.com", "phone": "+237670000000", "name": "Amina N." }
}Pay as an existing customer
Pass the customer id (or reuse the same email/phone) at initialization: the payment is
automatically linked.
curl https://api.wajub.com/payments \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3" \
-d '{ "amount": 5000, "currency": "XAF", "customer": "cus_7Yh2MpQ" }'Automatic deduplication
If you initialize with an email or phone already known, Wajub reuses the same Customer instead of creating a duplicate.
List & retrieve
Retrieve a customer by id, or list your customers with cursor-based pagination.
https://api.wajub.com/customers/{id}https://api.wajub.com/customers