Skip to content
Last updated

Create and manage customers

Resources at a glance

FieldPurpose
idImmutable Adfin identifier, returned on creation of the customer.
nameLegal name of the customer (business or individual).
people[]Optional contacts (each can have a name, email, and phone). Can be allocated as primary contact, and included in communications.
addresses[]A list of addresses for the customer. Currently, only one address is supported.
externalData[]Key-value pairs to connect with accounting platforms.

Create a customer

Use customers to store information, either for an individual or a business.

Adfin users will look at Customers, to understand their credit control status, their direct debit status and activity.

{
  "name": "John Doe Ltd",
  "people": [
    { "name": "John Doe", "email": "john@doe-ltd.co.uk" }
  ],
  "addresses": [
    { "line1": "2 Catherine Pl", "city": "London", "postCode": "SW1E 6HF" }
  ],
}

Direct debits for customers

Endpoint: GET /customers/[id]/directdebitmandates

  1. Call GET /customers/[id]/directdebitmandates with a JSON body containing a redirectUrl to bring the user back to your app (it is also returned in the create customer response).
  2. We return a URL — send the customer there to sign the mandate.
  3. Listen for the dd-mandate. Updated webhook to know when status moves to ACTIVE.
Direct debit patterns

Check out Direct Debit integration patterns guide.

Where you can learn how to enforce signature, set redirects and use pop-ups.

Cancel Mandate

If you ever need to void a mandate (e.g., customer changed bank), call

PUT /customers/directdebitmandates/[id]:cancel.


List & search customers

Endpoint: GET /customers

Supports rich server-side filtering so you rarely need client-side joins.


Query ParameterExample use
searchTextFuzzy search on name, email
onlyCustomersWithActivity=trueShow customers who have invoices or mandates
ddMandateStatuses=ACTIVEPre-filter by mandate status
financialStatus=OVERDUESurface at-risk customers as part of credit control
PaginationPage & Size

Best practices

  1. Create once, reuse forever – keep the Adfin customer ID in your DB.
  2. Attach mandate ASAP – trigger mandate creation right after sign-up so future invoices auto-collect.
  3. Sync contacts – push updated emails or addresses with PUT /customers whenever they change.
  4. Stay event-driven – subscribe to customer, updated, and dd-mandate. Updated to mirror state instantly.