Create a Direct Debit mandate
Creates a Direct Debit mandate for a customer. Bank details are validated with the bureau and stored KMS-encrypted; only masked values are returned.
Related endpoints
GET /mandates— List Direct Debit mandatesGET /mandates/{id}— Retrieve a Direct Debit mandatePOST /mandates/{id}/cancel— Cancel a Direct Debit mandatePOST /mandates/{id}/suspend— Suspend a Direct Debit mandatePOST /mandates/{id}/reinstate— Reinstate a suspended Direct Debit mandatePOST /mandates/{id}/collections— Schedule a one-off Direct Debit collection
Common errors
400 invalid_request— malformed payload or failed validation.401 unauthenticated— missing, malformed, or revoked API key.404 resource_missing— the referenced resource does not exist or is not visible to your key.409 conflict— Idempotency-Key collision with a different body, or a concurrent state-transition conflict.422 unprocessable_entity— business-rule failure (for example, refunding more than the original charge).
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
Authorization
apiKey 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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.revkeen.com/v2/mandates" \ -H "x-api-key: $REVKEEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customerId": "00000000-0000-0000-0000-000000000000", "accountHolderName": "Jane Smith", "sortCode": "20-00-00", "accountNumber": "55779911", "backupPaymentMethodId": "00000000-0000-0000-0000-000000000000", "requestToken": "string" }'{
"data": {
"id": "string",
"mandate_ref": "string",
"mandate_reference": "string",
"customer_id": "string",
"status": "pending_lodgement",
"account_holder_name": "string",
"sort_code": "XX-XX-00",
"account_number_last4": "string",
"bank_name": "string",
"statement_name": "string",
"notice_days": 0,
"first_collection_date": "string",
"next_collection_date": "string",
"backup_payment_method_id": "string",
"activated_at": "string",
"suspended_at": "string",
"cancelled_at": "string",
"failure_reason": "string",
"mandate_request_id": "string",
"invoice_id": "string",
"created_at": "string",
"updated_at": "string"
}
}