POST
/v1/mandates/{mandate_id}/cancel
Bearer
Idempotent
Cancel recurring
Stop an approved or pending mandate. Requires Idempotency-Key. Body: mobile, reason. The cancel HTTP response may show status: processing (request accepted); the mandate row is cancelled. All local mandates for this merchant that share the same upstream MandateId are cancelled too. After cancel, create a new mandate (step 1) — it returns processing until the customer approves again.
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
-
mobilerequired string -
reasonrequired string
Webhook events
POST https://omni.mojo-pay.com/v1/mandates/{mandate_id}/cancel
{
"mobile": "233597225334",
"reason": "Customer requested cancellation"
}
curl -X POST "https://omni.mojo-pay.com/v1/mandates/{mandate_id}/cancel" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mobile": "233597225334",
"reason": "Customer requested cancellation"
}'
Response
{
"object": "mandate_cancellation",
"status": "processing",
"mandate_id": "20146915",
"message_id": "eca0ddea-f572-4526-bb62-2c1fa64f15fa"
}