Mobile Money Money Transfer
Business to Customer (B2C)
As a PesaWay merchant, you can send money to your customers through various networks. The Business to Customer API is applicable in various use cases such as Salary Payments, Promotional Payments, winnings, financial institutions withdrawal of funds, loan disbursements etc.
Request Parameters
Field | Type | Description | Examples |
Amount | Number | The amount of money being sent to the customer. | 30.00 |
ExternalReference | Alpha-Numeric | A unique identifier of the transaction generated by the Merchant system. | "1234" |
PhoneNumber | Numeric | This is the customer mobile where the funds are to be received. Mobile number must include country code eg. 254712345678 | 2547*******8 |
Channel | Numeric | PesaWay account or other bank accounts where money is being transferred. | Code->Channel |
Reason | Alpha-Numeric | The reason for payment. | "Payment of transportation fee" |
ResultsUrl | URL | This is the URL to be specified in your request that will be used to send notification upon processing of the payment request | "https://yourdomain.com/result_url" |
Supported Channels
- MPESA
- Airtel
Sample Request
Response Parameters
Field | Type | Description | Example |
code | String | This is a status code for either success or failure of the transaction | "200.001" |
TransactionID | String | An identifier for the transaction request returned by PesaWay upon successful request submission. This is generated by PesaWay API. | "PHY20ADFASFASFS" |
OriginatorReference | String | An identifier for the transaction request from the merchant side. It is the input given as TransactionReference when sending B2C request. | "123344" |
Response Sample
Results Response
Field | Type | Description | Example |
ReceiverPartyPublicName | String | This full name of the customer receiving the funds. | "John Kym Doe" |
ResultCode | Numeric | The numeric status of the results, sent to the callback url 0 means success, while any other code indicates that an error occurred. | field |
ResultDesc | String | This is a message from the API that gives the status of the request processing and usually maps to a specific result code value. | "The service request is processed successfully" |
TransactionID | String | This is a unique PesaWay transaction ID for every payment request. Same value is sent to the customer over SMS upon successful processing. | PR52 |
TransactionReceipt | String | This is a unique transaction ID dependent on the channel for every payment request. Same value is sent to the customer over SMS upon successful processing. | QTD6ADFSAs |
TransactionAmount | Number | This is the amount that was transacted. It is usually returned under the ResultParameter array. | "10.00" |
OriginatorReference | Decimal | A unique identifier of the transaction generated by the Merchant system. | "254******77" |
TransactionCompletedDateTime | String | This is the date and time that the transaction completed PesaWay. | "20220305103101" |
AccountAvailableFunds | Decimal | This is the available balance after the transaction. | 564.00 |
Sample Result Response
Customer to Business (C2B)
As a PesaWay merchant, you can receive money from your customers through various networks. The Customer to Business API is applicable in various use cases such as ticket payments, invoicing, loan repayments etc.
Request Parameters
Field | Type | Description | Examples |
Amount | Number | The amount of money being to be received customer. | 30.00 |
ExternalReference | Alpha-Numeric | A unique identifier of the transaction generated by the Merchant system. | "1234" |
PhoneNumber | String | This is the customer mobile from where the funds are to be received. Mobile number must include country code eg. 254712345678 | 2547*******8 |
Channel | String | Collection method e.g. MPESA | Code->Channel |
Reason | Alpha-Numeric | The reason for payment. | "Payment of transportation fee" |
ResultsUrl | URL | This is the URL to be specified in your request that will be used to send notification upon processing of the payment request | "https://yourdomain.com/result_url" |
Supported Channels
- MPESA
Sample Request
Response Parameters
Field | Type | Description | Example |
code | String | This is a status code for either success or failure of the transaction | "200.001" |
TransactionID | String | An identifier for the transaction request returned by PesaWay upon successful request submission. This is generated by PesaWay API. | "PHY20ADFASFASFS" |
ResponseDescription | String | This is a message from the API that gives the status of the request processing and usually maps to a specific result code value. | "The service request is processed successfully" |
OriginatorReference | String | An identifier for the transaction request from the merchant side. It is the input given as ExternalReference when sending C2B request. | "123344" |
Response Sample
Results Response
Field | Type | Description | Example |
ResultCode | Numeric | The numeric status of the results, sent to the callback url 0 means success, while any other code indicates that an error occurred. | field |
ResultDesc | String | This is a message from the API that gives the status of the request processing and usually maps to a specific result code value. | "The service request is processed successfully" |
TransactionID | String | This is a unique PesaWay transaction ID for every payment request. Same value is sent to the customer over SMS upon successful processing. | PR52 |
TransactionReceipt | String | This is a unique transaction ID dependent on the channel for every payment request. Same value is sent to the customer over SMS upon successful processing. | QTD6ADFSAs |
TransactionAmount | Number | This is the amount that was transacted. It is usually returned under the ResultParameter array. | "10.00" |
OriginatorReference | Decimal | A unique identifier of the transaction generated by the Merchant system. | "254******77" |
TransactionCompletedDateTime | String | This is the date and time that the transaction completed PesaWay. | "20220305103101" |
AccountAvailableFunds | Decimal | This is the available balance after the transaction. | 564.00 |
Sample Result Response
split: true
code:
Query Transaction Status
This enables you to directly query the transaction status using the TransactionIDs
Test Endpoint:
Request Parameters
Request Parameters | Field Description | Example |
TransactionReference | A transaction reference for the target transaction | PHYD5AD5ASDF5 |
Request Sample
Response Sample
Response Parameters
Response Parameters | Field Type Description |
Reference | The Pesaway internal reference for the transaction |
PhoneNumber | The receiving phone number |
Receipt | MNO receipt |
Amount | Amount sent out in the transaction |
Charge | Amount charged to facilitate the transaction |
ResultDesc | A sentense describing whether the transaction filed or succeeded |
ResultCode | A code representation of the results .e.g. 0 |