/v1/mandates/{mandate_id}/debits
Bearer
Idempotent
Charge recurring now
Step 3 of the direct debit flow: POST /v1/mandates, then GET /v1/mandates until succeeded, then POST /v1/mandates/{mandate_id}/debits. Collect only after the mandate status is succeeded. Debit while pending returns HTTP 409. Required for every charge when you enroll via POST /v1/mandates or POST /v1/subscriptions (later cycles are not automatic). Hosted /subscribe enrollments are charged by Omni on the plan frequency. Collection fees apply using the merchant fee mode (on_top or absorb); responses include fee_amount, fee_mode, amount_payable, and merchant_settlement_amount.
Path parameters
-
mandate_idrequired string
Headers
-
Idempotency-Keyrequired string -
Required for money-moving and session/mandate creates; replays must use the same body.
Body parameters
-
amountrequired string -
currencyrequired string -
merchant_referencerequired string -
providerrequired string
Webhook events
mandate_debit.processing
mandate_debit.succeeded
mandate_debit.failed
{
"amount": "1.00",
"currency": "GHS",
"merchant_reference": "43654565xxx01001",
"provider": "MTN"
}
curl -X POST "https://omni.mojo-pay.com/v1/mandates/{mandate_id}/debits" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"amount": "1.00",
"currency": "GHS",
"merchant_reference": "43654565xxx01001",
"provider": "MTN"
}'
{
"object": "mandate_debit",
"status": "processing",
"merchant_reference": "43654565xxx01001",
"currency": "GHS",
"amount": "1.00",
"fee_amount": "0.02",
"fee_mode": "on_top",
"amount_payable": "1.02",
"merchant_settlement_amount": "1.00",
"message_id": "311c2f3e-ad50-406a-91a2-ee55a8dc7066"
}