Distribute Direct Debit Mandate for customer
This guide walks you through two steps:
- Create a Customer in Adfin.
- Trigger the Direct Debit mandate distribution workflow for that customer.
- If you already have a customer.id, you can skip to Step 2.
Step 1 — Create a Customer
Use the Create Customer endpoint and capture the returned id. You will pass this ID to the mandate workflow in Step 2.
Consult the Customer Create endpoint schema in the Adfin API reference for the complete set of supported fields. Below is a minimal example request.
curl --location --request POST "https://sa.adfin.com/api/customers" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <YOUR_API_KEY>" \
--data '{
"name": "Acme LLP",
"email": "[email protected]",
"metadata": {
"externalCustomerRef": "acme-001"
}
}'
{
"id": "e3af9a47-6e6c-456a-9a27-e5ebc0a4e3ee",
"name": "Acme LLP",
"email": "[email protected]",
"createdAt": "2025-09-10T12:34:56Z",
"metadata": {
"externalCustomerRef": "acme-001"
}
}
Step 2 — Distribute the Direct Debit mandate
Trigger the Direct Debit Mandate Authorisation workflow for your customer using the DD_MANDATE_AUTHORISATION type.
You can find full details for the payload in our API docs: https://docs.adfin.com/reference/createworkflow
curl --location --request PUT 'https://staging.adfin.com/api/workflows' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data '{
"name": "mandate chasing",
"type": "DD_MANDATE_AUTHORISATION",
"customerDetails": {
"id": "e3af9a47-6e6c-456a-9a27-e5ebc0a4e3ee" <-- Generated by customer ID in Step 1
},
"customMessage": "hey custom message from request"
}'
{
"workflowId": "6b5a78f1-1b5a-4d65-8c48-0d6b2b9f2c33",
"type": "DD_MANDATE_AUTHORISATION",
"customerId": "e3af9a47-6e6c-456a-9a27-e5ebc0a4e3ee",
"createdAt": "2025-09-10T12:45:12Z"
}
This will distribute the Direct debit to the specified customer.
Updated about 9 hours ago