curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel \
-H "Authorization: Bearer sk_test_..."
import requests
response = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel",
headers={"Authorization": "Bearer sk_test_..."},
)
const response = await fetch("https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel", {
method: "POST",
headers: { Authorization: "Bearer sk_test_..." },
});
{ "id": "mdt_123", "status": "cancelled", "state": "cancelled", "merchantScope": "listed", "approvedAmount": "40.00", "currency": "USD" }
{
"error": { "code": "MANDATE_INVALID_TRANSITION", "message": "The mandate's current status forbids this action" }
}
Mandate lifecycle
Cancel a Mandate
Permanently stop future charges on a mandate.
POST
/
v1
/
mandates
/
{id}
/
cancel
curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel \
-H "Authorization: Bearer sk_test_..."
import requests
response = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel",
headers={"Authorization": "Bearer sk_test_..."},
)
const response = await fetch("https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel", {
method: "POST",
headers: { Authorization: "Bearer sk_test_..." },
});
{ "id": "mdt_123", "status": "cancelled", "state": "cancelled", "merchantScope": "listed", "approvedAmount": "40.00", "currency": "USD" }
{
"error": { "code": "MANDATE_INVALID_TRANSITION", "message": "The mandate's current status forbids this action" }
}
Cancel an active or paused mandate to permanently stop future charges. The request takes no body and returns the updated mandate.
POST /v1/mandates/{id}/cancel
Path parameters
string
required
The mandate id.
Response
Returns the updated mandate withstatus: "cancelled".
Notes
- Cancellation is terminal and does not affect past charges.
- Only an
activeorpausedmandate can be cancelled. Any other transition returns409 MANDATE_INVALID_TRANSITION. - Only the mandate’s owner can act on it; a mismatched caller gets
403 MANDATE_FORBIDDEN.
curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel \
-H "Authorization: Bearer sk_test_..."
import requests
response = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel",
headers={"Authorization": "Bearer sk_test_..."},
)
const response = await fetch("https://sandbox.api.prava.space/v1/mandates/mdt_123/cancel", {
method: "POST",
headers: { Authorization: "Bearer sk_test_..." },
});
{ "id": "mdt_123", "status": "cancelled", "state": "cancelled", "merchantScope": "listed", "approvedAmount": "40.00", "currency": "USD" }
{
"error": { "code": "MANDATE_INVALID_TRANSITION", "message": "The mandate's current status forbids this action" }
}
Authorizations
Your secret key: sk_test_* (sandbox) or sk_live_* (production).
Path Parameters
The mandate id.
Response
Updated mandate.
A standing spending authorization (list view).
Mandate id (mdt_…).
Display-derived usability.
Available options:
available, consumed, expired, paused, cancelled, pending Available options:
pending, active, paused, consumed, cancelled, expired Available options:
one_time, weekly, monthly, yearly Available options:
any, listed The authorized per-charge cap.
Remaining spend in the current window (indicative; the network enforces the real cap).
Next cycle boundary for recurring mandates.
Show child attributes
Show child attributes