Skip to main content

MPesa

Підключення платіжного методу MPesa вимагає використання direct-інтеграції. Запит на створення платежу повинен містити такі параметри:

ParameterTypeRequiredDescription
pos_idUUID✅Merchant's identifier (POS_ID)
modeMODE✅direct
methodMETHOD✅Payment method (purchase)
amountNumber✅Transaction amount
currencyCURRENCY✅Transaction currency (ISO_4217)
order_3ds_bypassString✅3-D Secure flow option
order_idString✅Unique identifier of order
descriptionString✅Payment description
paywayString✅mobile
server_urlURLWebhook notification will be sent to this URL
result_urlURLCustomer will be redirected to this URL after payment.
customer_fnameString✅customer first name
customer_lnameString✅customer last name
customer_emailString✅customer email address
customer_phoneString✅customer phone number
customer_countryString✅Customer country (ISO 3166-1 (alpha-2)). For instance, UA for Ukraine
properties.networkString✅network provider

Приклад запиту:

{
"pos_id": "'$POS_ID'",
"mode": "direct",
"method": "purchase",
"amount": 100,
"currency": "USD",
"payway": "mobile",
"order_id": "'$ORDER_ID'",
"customer_fname": "John",
"customer_lname": "Doe",
"customer_email": "[email protected]",
"customer_phone": "254715303037",
"customer_country": "UA",
"description": "Test description for '$ORDER_ID'# payment",
"order_3ds_bypass": "supported",
"properties": {
"network": "MPESA_KE"
}
}