MPesa
Підключення платіжного методу MPesa вимагає використання direct-інтеграції. Запит на створення платежу повинен містити такі параметри:
Parameter | Type | Required | Description |
---|---|---|---|
pos_id | UUID | ✅ | Merchant's identifier (POS_ID ) |
mode | MODE | ✅ | direct |
method | METHOD | ✅ | Payment method (purchase ) |
amount | Number | ✅ | Transaction amount. Must be a positive number. The number of decimal digits must be less than or equal to 2 (e.g., 100.00, 250, 50.50) |
currency | CURRENCY | ✅ | Transaction currency (ISO_4217) |
order_3ds_bypass | String | ✅ | 3-D Secure flow option |
order_id | String | ✅ | Unique identifier of order |
description | String | ✅ | Payment description |
payway | String | ✅ | mobile |
server_url | URL | Webhook notification will be sent to this URL | |
result_url | URL | Customer will be redirected to this URL after payment. | |
customer_fname | String | ✅ | customer first name |
customer_lname | String | ✅ | customer last name |
customer_email | String | ✅ | customer email address |
customer_phone | String | ✅ | customer phone number |
customer_country | String | ✅ | Customer country (ISO 3166-1 (alpha-2)). For instance, UA for Ukraine |
properties.network | String | ✅ | 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"
}
}