💸POST: Sasa Pay Payment
This endpoint is used to collect funds to your payments wallet using Sasa Pay.
Sasapay enables your customers to pay you using MPESA, Airtel Money, T-Kash and PesaLink. In this documentation, we will show you how to initiate payments from the above channels using Sasapay.
API Method
This endpoint enables you to get paid Via Sasapay to your payments wallet.
POST
https://backend.payhero.co.ke/api/v2/payments
Headers
Name | Type | Description |
---|---|---|
Authorization:* | String | Basic basicAuthToken |
Request Body
Name | Type | Description |
---|---|---|
amount* | Integer | Amount you want to get paid eg: 10 |
phone_number* | String | Customer phone number to make the payment eg: 0787655535 |
provider* | String | Value: sasapay |
network_code* | String | A unique digit code used for identifying the various mobile money providers 63902 (MPesa) 63903 (AirtelMoney) 63907 (T-Kash) 01 (PesaLink) |
external_reference | String | Your unique reference to track this transaction Eg: INV-009 |
callback_url | String | Your endpoint URL that we will use to send payment status response eg: https://example.com/callback.php |
Sample Code
This represents PHP Curl example of how to make the request, you can implement this in your specific language of choice
Callback URL Response Sample
This represents the JSON that will be sent to your request callback_url, NOTE: it contains the ExternalReference that you provided in the request and CheckoutRequestID that was returned in the request response, you can use those to track and update your payments in your system/app
Last updated