M-Pesa
M-Pesa is a PUSH payment system. Once a payment is initiated, it gets the pending
status. You have to wait until your customer approves the payment.
This alternative payment method supports the following operations:
Payment
Request
Send a payment request with the following additional parameters:
Parameter | Type | Description |
---|---|---|
method | object | A section of the payment method information. |
type | string | m_pesa |
account | string | A phone number from which the payment will be initiated. |
Response
The m_pesa
response section will have the parameters copied from the request.
Refund
Request
In order to make a refund via M-Pesa, send the following data in the method
section:
Parameter | Type | Description |
---|---|---|
method | object | A section of the payment method information. |
type | string | m_pesa |
account | string | A phone number where to transfer funds. |
Response
The m_pesa
response section will have the parameters copied from the request.
Payout
Request
In order to create a payout operation via M-Pesa, send the following data in the method
section:
Parameter | Type | Description |
---|---|---|
method | object | A section of the payment method information. |
type * required |
string | m_pesa |
account * required |
string | A phone number where to transfer funds. |
command_id * required |
string | A payout category. Possible values for a B2C payout: SalaryPayment ;BusinessPayment ;PromotionPayment .Possible values for a B2B payout: BusinessPayBill ;MerchantToMerchantTransfer ;MerchantTransferFromMerchantToWorking ;MerchantServicesMMFAccountTransfer ;AgencyFloatAdvance . |
shortcode * conditionally required |
string | A short code of the organization receiving funds. Submit in case of a B2B payout operation. |
Response
The m_pesa
response section will have the parameters copied from the request.