POST: Pay Hero Wallet- Request Payment
This endpoint is used to collect funds to your payments wallet
Pay Hero wallet enables your customers to pay you using MPESA,. In this documentation, we will show you how to initiate payments
API Method
This endpoint enables you to get paid to your payments wallet.
POST
https://backend.payhero.co.ke/api/v2/payments
Headers
Authorization:*
String
Basic basicAuthToken
Request Body
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)
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
Was this helpful?