Merchant customers
Retrieve the List of all your customers
As a merchant, you can retrieve the list of your beneficiaries by making a get request to the following endpoint and passing in the MerchantCode as a query parameter.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/customers/?merchant_code=2***8
Query Parameters
Field | Type | Description | Example |
---|---|---|---|
merchan_code=2***8 | Query Parameter | The merchantCode query parameter set to retirev you beneficiaries | MerchantCode=2****8 |
Sample Request
Headers
Key: Authorization
Value: Bearer Q1k2RW5SOGlsYUZnRzNGMQUlDS3VrTFhVV0xScFVHYQ==
Response Parameters
Field | Type | Description | Example |
---|---|---|---|
status | Boolean | This status shows whether the list of customers was retrieved successfully or not | true or false |
message | String | A detailed description of the status | "Customer retrieved successfully" |
Result | Array | An array of all the customers of the merchant. | “Result” :[] |
customer | object | An object of the attributes of a customer | "customer": {"display_name": "John K. Doe", "mobile_number": "07***8" } |
customer_account_number | Numeric | This is a unique number identifying your customer in the system. It is composed of the merchant code and customer id on the system. | 4*6-3 |
display_name | String | The full name of the customer | “John Doe” |
mobile_number | Numeric | This is the mobile number identifying a merchant’s customer as provided during registration. | 07***8 |
customer_balance | Numeric | The total amount of money that a specific customer has on their wallet. | 72.00 |
Response Sample
{
"status": true,
"responseCode": "0",
"message": "Customers",
"links": {
"next": null,
"previous": null
},
"count": 7,
"pages": 1,
"results": {
"customers": [
{
"client": {
"display_name": "John Doe"
},
"account_number": "1234",
"currency_code": "KES",
"description": "John Account",
"account_balance_derived": "0.00",
"account_type": "Personal"
},
{
"client": {
"display_name": "Jane Doe"
},
"account_number": "1245",
"currency_code": "KES",
"description": "Jane Account",
"account_balance_derived": "11.00",
"account_type": "Personal"
}
]
},
"total_accounts_balance": "2352.2"
}
Customer details
You can retrieve the details of an individual beneficiary by appending CustomerAccountNumber in the request as a query parameter.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/customer-details/
Request Parameters
Field | Type | Description | Example |
---|---|---|---|
merchantCode | String | Unique code assigned to the merchant | "2**2" |
accountNumber | String | Masked account number of the merchant | "254702****0" |
countryCode | String | Country code of the merchant's location | "254" |
Request Sample
Headers
Key: Authorization
Value: Bearer Q1k2RW5SOGlsYUZnRzNGMk1DNIyZWs6QUlDS3VrTFhVV0xScFVHYQ==
Body:
{
"merchantCode": "2**2",
"accountNumber": "254702****0",
"countryCode": "254"
}
Response Parameters
Field | Type | Description | Example |
---|---|---|---|
statusCode | Numeric | This is a numeric status code that indicates the status of the response. 0 means success and any other code means an error occurred or the request failed.Please refer to the response codes table above. | 0 |
message | String | A detailed description of the status | "Customer retrieved successfully" |
Result | JSON object | An object of all the customers of the merchant. | “Result” :[] |
Response Sample
{
"status": true,
"responseCode": "0",
"message": "Client profile",
"data": {
"profile": {
"display_name": "John Doe",
"mobile_number": "254702*****0",
"account_status": "ACTIVE"
},
"CustomerWallets": [
{
"account_number": "12980",
"client": {
"display_name": "John Doe"
},
"currency_code": "KES",
"description": "John Doe",
"account_balance_derived": "11.00"
}
],
"merchantCode": "2**2"
}
}
Update customer details
In cases where the beneficiary is rejected during account verification, Beneficiary is able to amend their KYC details.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/customer-details/update/
Request Parameters
Field | Type | Description | Example |
---|---|---|---|
merchantCode | String | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | 4****6 |
accountNumber | String | A unique number assigned to the customer. This is returned during personal account onboarding as account number. | 12345 |
firstName | String | The first name of the customer as it appears on the identity card or passport | “John” |
middleName | String | The middle name of the customer as it appears on their identity card/Passort(Optional) | “K” |
lastName | String | The last name of the customer as it appears on their identity card | “Doe” |
String | Email of the customer (Optional) | “Doe” | |
documentType | String | This is the type of identifying documentation for the customer | 1.ID card 2.Passport 3. Alien ID |
documentNumber | String | This is the number on the identification document type | 2****4 |
callbackUrl | URL string | This is the link where sasapay will send the data about beneficiary status during onboarding process.This data can be used by the mechant to update beneficiary status on merchant system. | https://example.com/callbackurl/ |
Request sample
Headers
Key: Authorization
Value: Bearer cFJZcjZ6anEwaThM6UmYyMkJmWm9nMHFRR2xWOQ==
Body:
{
"merchantCode": "600980",
"accountNumber": "12345",
"firstName": "John",
"middleName": "",
"lastName": "Doe",
"documentNumber": "1234328",
"documentType": "1",
"email": "johndoe@gmail.com",
"callbackUrl": "https://example.com/callbackurl"
}
Response Parameters
Field | Type | Description | Example |
---|---|---|---|
status | boolean | Indicates the status of the operation. | true |
statusCode | String | This is a numeric status code that indicates the status of the response. 0 means success and any other code means an error occurred or the request failed.Please refer to the response codes table above. | 0 |
message | String | A description of the response status sent when a request is received. | Success.Kindly upload KYC for re-verification. |
Sample Response
{
"status": true,
"responseCode": "0",
"message": "Success.Kindly upload KYC for re-verification."
}