RevKeenDocs

Cancel a Direct Debit mandate

Cancels the mandate for future collections only. Requires portal DD self-service. Bank changes affect future only (per approved V13 mockup).


Related endpoints

  • POST /customer-portal/sessions — Create a customer-portal session
  • GET /customer-portal/customer — Retrieve the authenticated customer
  • GET /customer-portal/subscriptions — List the authenticated customer's subscriptions
  • GET /customer-portal/subscriptions/{id} — Retrieve a subscription
  • POST /customer-portal/subscriptions/{id}/cancel — Cancel a subscription
  • GET /customer-portal/invoices — List the authenticated customer's invoices
  • GET /customer-portal/invoices/{id} — Retrieve an invoice
  • GET /customer-portal/mandates — List the authenticated customer's Direct Debit mandates

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 403 permission_denied — key lacks the required scope, or the resource belongs to a different merchant.
  • 404 resource_missing — the referenced resource does not exist or is not visible to your key.

Idempotency

Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.

POST
/customer-portal/mandates/{id}/cancel
x-api-key<token>

Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.

In: header

Path Parameters

id*string

Mandate ID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

reason?string

Response Body

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X POST "https://api.revkeen.com/v2/customer-portal/mandates/00000000-0000-0000-0000-000000000000/cancel" \
  -H "x-api-key: $REVKEEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string"
  }'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "object": "mandate",
    "status": "string",
    "account_holder_name": "string",
    "account_number_last4": "string",
    "bank_name": "string",
    "mandate_reference": "string",
    "next_collection_date": "string",
    "created_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}