Skip to main content

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.

Alt test Endpoint: https://sandbox.sasapay.app/api/v2/waas/payments/merchant-transfers/

Request Parameters

FieldTypeDescriptionExample
merchantCodeNumericA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)2****8
transactionReferenceAlpha-NumericThis is a unique identifier of this payment request transaction.3611862
currencyCodeNumericA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)KES
TransactionDescNumericA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)Send Money
AmountNumericThis the amount of money being transferred from the beneficiary account to the MobileOperatorNumber50
reasonStringThis is an optional message describing the purpose of the transaction."Money for shopping"
channelStringMobile money providers where money is being transferred.0
receiverNumberStringThis is the number that will be recieving the money from the beneficiary account.25472****726
callbackUrlURLThis 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

FieldTypeDescriptionExample
statusStringThis is status code that indicates the status of the response."true"
responseCodeAlpha-NumericA unique identifier for a transaction and can be used to check the status of the transaction."0"
checkoutRequestIdAlpha-NumericThis is a unique identifier of this payment request transaction.2612-10168682-e5a1-46b0-ad6d-a62f525ae2fd
merchantReferenceAlpha-NumericA unique identifier for a transaction and can be used to check the status of the transaction."3611962"
transactionChargesAlpha-NumericA unique identifier for a transaction and can be used to check the status of the transaction."9"
messageAlpha-NumericA 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

FieldTypeDescriptionExample
DestinationChannelStringThis is the network code that identifies the mobile money provider such as M-PESA.63902
RecipientNameNumericThis is the name of the person recieving the money."John Doe"
RecipientAccountNumberNumericThis is the mobile number that received the money.2547******08
ResultCodeNumericThis 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
SenderAccountNumberNumericThis is the account number of the beneficiary who sent the money.40***59-122
CheckoutRequestIDAlpha-NumericA unique identifier of the checkout request"6**7"
MerchantRequestIDStringA unique identifier of the payment transaction request generated from the merchant’s system."6*1**4"
MerchantCodeNumericA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)."40***59"
ResultDescStringA message from the API that provides more details about the status of processing the payment request."Transaction processed successfully"
SourceChannelStringThe channel through which the payment was made."SasaPay"
TransactionDateTimeStampThis is a timestamp that represents the date and time that the transaction completed in the format YYYYMMDDHHmmss20220504064810
TransactionAmountNumericThis is the amount of money transferred from the beneficiary account."50"
SasaPayTransactionIDAlpha-NumericA unique identifier of the payment transaction request generated from the API."W****67"
MerchantTransactionReferenceAlpha-NumericA unique identifier of the payment transaction request generated from the merchant’s system."a38104d5-0306-****-a6e6-2867ebcc4949"
MerchantAccountBalanceNumericThis 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"
}