initiate_payment
Starts an M-Pesa or mobile money payment request via Malipo API, returning the response format needed to implement local payment flows and callbacks.
Instructions
Initiate a payment request (M-Pesa, etc.) via Malipo API. Call this to inspect the response structure needed to implement mobile money flows in your local code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Transaction amount as a string to avoid precision issues (e.g., '5000'). | |
| address | No | Optional override for API base URL. | |
| reference | Yes | Unique order reference from your system. Used to match callbacks. | |
| customer_msisdn | Yes | Customer phone number in international format without '+' (e.g., 255700000000). Essential for Mobile Money push. | |
| sandbox_scenario | No | In sandbox mode, forces the outcome of the payment push. Maps to the X-Sandbox-Scenario header. |