Merchant Transfers
As a merchant, you can transfer funds directly from your merchant account to your customers' wallets or other mobile money providers such as M-PESA, Airtel Money and T-Kash. A POST request to an endpoint below enables that.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/payments/merchant-transfers/
Request Parameters
| Field | Type | Description | Example |
|---|---|---|---|
| merchantCode | Numeric | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | 2****8 |
| transactionReference | Alpha-Numeric | This is a unique identifier of this payment request transaction. | 3611862 |
| currencyCode | Numeric | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | KES |
| TransactionDesc | Numeric | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | Send Money |
| Amount | Numeric | This the amount of money being transferred from the beneficiary account to the MobileOperatorNumber | 50 |
| reason | String | This is an optional message describing the purpose of the transaction. | "Money for shopping" |
| channel | String | Mobile money providers where money is being transferred. | 0 |
| receiverNumber | String | This is the number that will be recieving the money from the beneficiary account. | 25472****726 |
| callbackUrl | URL | This is the URL where SasaPay will send the results after the payment process is initiated. | https://example.com/callback/ |
Request sample
Headers
Key: Authorization
Value: Bearer Q1k2RW5SOGlsYUZnRzNGMk1DNlE1T1gzemFtY
Body
{
"merchantCode": "2612",
"transactionReference": "3611862",
"currencyCode": "KES",
"TransactionDesc": "Send Money",
"amount": 100,
"reason": "Send Money",
"channel": "01",
"receiverNumber": "1259855104",
"callbackUrl": "https://posthere.io/4bdd-47d5-a54d/callback/"
}
Response Parameters
| Field | Type | Description | Example |
|---|---|---|---|
| status | String | This is status code that indicates the status of the response. | "true" |
| responseCode | Alpha-Numeric | A unique identifier for a transaction and can be used to check the status of the transaction. | "0" |
| checkoutRequestId | Alpha-Numeric | This is a unique identifier of this payment request transaction. | 2612-10168682-e5a1-46b0-ad6d-a62f525ae2fd |
| merchantReference | Alpha-Numeric | A unique identifier for a transaction and can be used to check the status of the transaction. | "3611962" |
| transactionCharges | Alpha-Numeric | A unique identifier for a transaction and can be used to check the status of the transaction. | "9" |
| message | Alpha-Numeric | A unique identifier for a transaction and can be used to check the status of the transaction. | "Transaction of KSH100 to bank is being processed" |
Response Sample
{
"status": true,
"responseCode": "0",
"checkoutRequestId": "674bb361-f763-42a0-9611-05f986cb8a0b",
"merchantReference": "3611062",
"transactionCharges": "0",
"message": "Transaction of KSH100 to bank is being processed"
}
After the payment request is processed, the RESULTS are sent to the API which forwards these results to your system through the callback URL.
Results Parameters
| Field | Type | Description | Example |
|---|---|---|---|
| DestinationChannel | String | This is the network code that identifies the mobile money provider such as M-PESA. | 63902 |
| RecipientName | Numeric | This is the name of the person recieving the money. | "John Doe" |
| RecipientAccountNumber | Numeric | This is the mobile number that received the money. | 2547******08 |
| ResultCode | Numeric | This is status code that indicates the status of the transaction. 0 means success and any other code means an error occurred or the transaction failed.Please refer to the response codes table above. | "ResultCode" : 0 |
| SenderAccountNumber | Numeric | This is the account number of the beneficiary who sent the money. | 40***59-122 |
| CheckoutRequestID | Alpha-Numeric | A unique identifier of the checkout request | "6**7" |
| MerchantRequestID | String | A unique identifier of the payment transaction request generated from the merchant’s system. | "6*1**4" |
| MerchantCode | Numeric | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number). | "40***59" |
| ResultDesc | String | A message from the API that provides more details about the status of processing the payment request. | "Transaction processed successfully" |
| SourceChannel | String | The channel through which the payment was made. | "SasaPay" |
| TransactionDate | TimeStamp | This is a timestamp that represents the date and time that the transaction completed in the format YYYYMMDDHHmmss | 20220504064810 |
| TransactionAmount | Numeric | This is the amount of money transferred from the beneficiary account. | "50" |
| SasaPayTransactionID | Alpha-Numeric | A unique identifier of the payment transaction request generated from the API. | "W****67" |
| MerchantTransactionReference | Alpha-Numeric | A unique identifier of the payment transaction request generated from the merchant’s system. | "a38104d5-0306-****-a6e6-2867ebcc4949" |
| MerchantAccountBalance | Numeric | This the amount of money remaining in the merchant's account after transaction. | "1000.00" |
Result sample
{
"MerchantRequestID": "363211862",
"CheckoutRequestID": "87118e7b-7ec6-****-af9d-ba0b17e881b7",
"ResultCode": 0,
"ResultDesc": "Transaction processed successfully.",
"MerchantCode": "2**2",
"TransactionAmount": "100.00",
"MerchantAccountBalance": "10111.80",
"MerchantTransactionReference": "363211862",
"TransactionDate": "20231114030524",
"RecipientAccountNumber": "12**104",
"DestinationChannel": "01",
"SourceChannel": "SasaPay",
"SasaPayTransactionID": "",
"RecipientName": "",
"SenderAccountNumber": "2**2"
}