Pay out
Send money from your balance to a customer's wallet.
Send money from your Flex Malipo balance to a customer's M-Pesa or Mixx by Yas wallet.
Before you pay out
- Use a key with the
payouts.writeandpayments.writescopes. - Send an amount between the smallest and the largest payout of the customer's network, which
List payment methods shows under
payout. See Amount limits. - Keep enough balance for the amount plus the fee.
Create a payout
Create a payment with kind DISBURSEMENT:
curl -X POST "https://api-malipo.flex.co.tz/api/v1/payments" \
-H "Authorization: Bearer <token>" \
-H "Idempotency-Key: 8d2f4a1c-6b3e-4f7a-9c0d-1e2f3a4b5c6d" \
-H "Content-Type: application/json" \
-d '{
"kind": "DISBURSEMENT",
"amount": 10000,
"currency": "TZS",
"payment_method_data": {
"type": "mobile_money",
"mobile_money": { "phone": "255700000001" }
},
"merchantReference": "payout-1042"
}'Then act on the outcome as for a collection.
Your balance
The amount plus the fee leaves your available balance as soon as the payout is sent, and the payout's net is minus
(amount plus fee).
- On
payment.succeeded, the money is gone. - On
payment.failed, you have it back. - If your balance is too low, the payout fails with
failureCodeINSUFFICIENT_BALANCEand nothing leaves it.
Errors
| Status | Code | Why |
|---|---|---|
400 | amount_too_small, amount_too_large | The amount is below the smallest or above the largest payout of the network. limit shows the amount that was broken. |
400 | parameter_invalid | Another field is not valid. |
403 | permission_denied | The key lacks payouts.write, or payouts are not available to you (contact support). |
422 | payment_method_unactivated | The customer's network is not available to you, is switched off, or cannot pay out yet. |
422 | request_not_allowed | No fee is set up for payouts in this currency. |
A payout cannot be reversed. If one went to the wrong person, contact support with its id.