Skip to main content

SasaPay Pre-approved Payments

As a SasaPay merchant, you can set up pre-approved accounts to be the exclusive recipients of funds from your merchant account through various channels, including M-Pesa, banks, and SasaPay

Note: The funds are debited from the Utility Account label.

Alt test Endpoint: https://sandbox.sasapay.app/api/v1/payments/approved/

Request Parameters

FieldTypeDescriptionExamples
MerchantCodeStringA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)"2*****8"
MerchantTransactionReferenceAlpha-NumericA unique identifier of the transaction generated by the Merchant system."1234"
CurrencyStringStandardization that defines alpha codes and numeric codes for the representation of currenciesKES
AmountNumberThe amount of money being sent to the customer.30.00
ChannelCodeNumericSasapay account or other bank accounts where money is being transferred.Code->Channel
0 -> SasaPay
SenderMerchantCodeNumericThis is the customer mobile or bank account number where the funds are to be received. Mobile number must include country code eg. 2547123456782547*******8
ReceiverAccountNumberNumericThis is the customer mobile or bank account number where the funds are to be received. Mobile number must include country code eg. 2547123456782547*******8
ReasonAlpha-NumericThe reason for payment."Payment of transportation fee"
CallBackURLURLThis is the URL to be specified in your request that will be used by SasaPay to send notification upon processing of the payment request"https://yourdomain.com/result_url"

Channel Codes

Channel Codes

CodeEntity Name

  • 00 SasaPay
  • 01 KCB
  • 02 Standard Chartered Bank KE
  • 03 Absa Bank
  • 07 NCBA
  • 10 Prime Bank
  • 11 Cooperative Bank
  • 12 National Bank
  • 14 M-Oriental
  • 16 Citibank
  • 18 Middle East Bank
  • 19 Bank of Africa
  • 23 Consolidated Bank
  • 25 Credit Bank
  • 31 Stanbic Bank
  • 35 ABC Bank
  • 36 Choice Microfinance Bank
  • 43 Eco Bank
  • 50 Paramount Universal Bank
  • 51 Kingdom Bank
  • 53 Guaranty Bank
  • 54 Victoria Commercial Bank
  • 55 Guardian Bank
  • 57 I&M Bank
  • 61 HFC Bank
  • 63 DTB
  • 65 Mayfair Bank
  • 66 Sidian Bank
  • 68 Equity Bank
  • 70 Family Bank
  • 72 Gulf African Bank
  • 74 First Community Bank
  • 75 DIB Bank
  • 76 UBA
  • 78 KWFT Bank
  • 89 Stima Sacco
  • 97 Telcom Kenya
  • 63902 MPesa
  • 63903 AirtelMoney
  • 63907 T-Kash
Sample request
Headers
Key: Authorization
Value: Bearer cFJZcjZ6anEwaThMMXp6d1FETUxwWkIzeVBDa2hNc2M6UmYyMkJmWm9nMHFRR2xWOQ==
Body:{
"MerchantCode": "112367",
"MerchantTransactionReference": "131817582",
"Currency": "KES",
"Amount": 10,
"ChannelCode": "0",
"SenderMerchantCode": "112367",
"ReceiverAccountNumber": "254710239694",
"AccountReference": "1234",
"CallBackURL": "https://webhook.site/13bacb3c-f9b7-4b24-bdb4-1c2a3158d5b2",
"Reason": "Pre approved Payment"
}

Response Sample

FieldTypeDescriptionExample
statusNumericThis is a boolean true or false status that indicates the outcome of the response. true means success and false means transaction failed or intermittent error occured.true
detailStringA description of the response status sent by SasaPay API."Transaction is being processed"
MerchantRequestIDStringAn identifier for the transaction request returned by SasaPay upon successful request submission. This is generated by SasaPay API."131817582"
CheckoutRequestIDStringAn identifier for the transaction request returned by SasaPay upon successful request submission. This is generated by SasaPay API."0f8dc1f9-6721-****-44e575166f7a"
ResponseCodeNumericThis 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.0
ResponseDescriptionStringThis is the details of the status of the request."Transaction is being processed."
Sample response
{
"status": true,
"detail": "Transaction is being processed",
"MerchantRequestID": "131817582",
"CheckoutRequestID": "0a44f8ae-0c6a-4afe-9277-420c717ede35",
"ResponseCode": "0",
"ResponseDescription": "Transaction is being processed"
}

Results Response

FieldTypeDescriptionExample
MerchantRequestIDDecimalThe unique id sent with the transaction request from the Merchant system"1318*****2"
CheckoutRequestIDStringThis is a unique SasaPay transaction ID for every payment request. Same value is sent to the customer over SMS upon successful processing."0a44f8ae-0c6a-4afe-9277-420c717ede35"
ResultCodeNumericThe numeric status of the results, sent to the callback url0 means success, while any other code indicates that an error occurred. The specific error is described in the ResultDesc field
ResultDescStringThis is a message from the API that gives the status of the request processing and usually maps to a specific result code value."Transaction processed successfully."
MerchantCodeNumberA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)"11***7"
TransactionAmountNumberThis is the amount that was transacted. It is usually returned under the ResultParameter array."10.00"
MerchantTransactionReferenceDecimalA unique identifier of the transaction generated by the Merchant system."1318*****2"
TransactionDateStringThis is the date and time that the transaction completed SasaPay."20240516113659"
SourceChannelStringThe name of the entity channel from where the funds transfer is initiated"SasaPay"
DestinationChannelStringThis name of entity channel where the funds are sent."SasaPay"
SasaPayTransactionCodeStringThis is the transaction code from SasaPay"EJ2AIF0983VYQ"
SasaPayTransactionIDJSON ObjectThis is a unique SasaPay transaction ID for every payment request. Same value is sent to the customer over SMS upon successful processing. It is usually returned under the ResultParameter array."PR2717"
RecipientAccountNumberStringThis account number where the funds are received"2547****694"
RecipientNameStringThis full name of the customer receiving the funds."Brian Ng'ang'a"
MerchantAccountBalanceDecimalThis is the available balance of the Charges Paid account under the B2C MerchantCode used in the transaction."5045.00"
sample result response
{
"MerchantRequestID": "131817582",
"CheckoutRequestID": "0a44f8ae-0c6a-4afe-9277-420c717ede35",
"ResultCode": "0",
"ResultDesc": "Transaction processed successfully.",
"MerchantCode": "112367",
"TransactionAmount": "10.00",
"TransactionCharge": "0.00",
"MerchantTransactionReference": "131817582",
"TransactionDate": "20240516113659",
"SourceChannel": "SasaPay",wa
"DestinationChannel": "SasaPay",
"SasaPayTransactionCode": "EJ2AIF0983VYQ",
"LinkedTransactionCode": "",
"SasaPayTransactionID": "PR2717",
"ThirdPartyTransactionCode": "",
"RecipientAccountNumber": "254********4",
"RecipientName": "Johh Kym Doe",
"MerchantAccountBalance": "5045.00"
}