Direct debit mandates

Create a direct debit mandate

Changed on

The request body is optional. It may carry a redirectUrl and, through mandateRemindersPreferences, ask the agent to remind the customer to set the mandate up. Reminders are off unless mandateRemindersPreferences.mandateReminders.enabled is true. Set mandateRemindersPreferences.useAgentDefaults to true to leave the customer's reminder configuration untouched. Bank details cannot be submitted through the API: the customer authorises the mandate themselves via the url returned in the response. In staging, you can open that link yourself and complete it with test bank details.

put/customers/{id}/directdebitmandates

Request

  • Base URL
    https://api.adfin.com/api
  • URL
    https://api.adfin.com/api/customers/{id}/directdebitmandates
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.staging.adfin.com/api/oauth2/token
    • or OAuth 2
      Client credentials
      Token URL: https://api.adfin.com/api/oauth2/token

Path parameters

idstring required

The id of the customer for whom to create the mandate

Request body

redirectUrlstring

The redirect URL to redirect the user after they sign the mandate

Response

The direct debit mandate was created

idstring

The ID of the mandate

creationTimestring date-time

The creation time of the mandate

lastUpdateTimestring date-time

The last time when the mandate was updated

distributionTimestring date-time

The time when the mandate was sent to the customer

authorisationTimestring date-time

The time when the mandate was signed by the customer

submissionTimestring date-time

The time when the mandate was submitted to the payment provider

status'CREATED' | 'PENDING' | 'ACTIVE' | 'PENDING_CANCELLATION' | 'CANCELLED' | 'MIGRATING'

The mandate status

failureReasonstring

The reason for failing to set up the mandate

statusReasonCode'PENDING_DD_CAPABILITY' | 'PENDING_ACTIVATION' | 'MIGRATED' | 'BANK_ACCOUNT_CHANGED' | 'INCORRECT_BANK_DETAILS' | 'INSTRUCTION_CANCELLED_BY_PAYER' | 'PAYER_DECEASED' | 'ACCOUNT_TRANSFERRED' | 'ADVANCE_NOTICE_DISPUTED' | 'AMOUNT_DISPUTED' | 'MANDATE_NOT_FOUND' | 'DISPUTE_TOO_EARLY' | 'DISPUTE_TOO_LATE' | 'INVALID_SORT_CODE' | 'INVALID_ACC_NUMBER' | 'ACCOUNT_CLOSED' | 'CANCELLED_ON_DEMAND' | 'REINSTATED' | 'MIGRATION_TIMEOUT' | 'DISCARDED_BY_BILLER' | 'ACCEPTED_ON_CREATION' | 'DEBIT_NOT_AUTHORIZED' | 'DEACTIVATED_BY_PAYMENT_PROVIDER' | 'OTHER'

The reason as predefined code why the mandate is in a certain status

statusReasonstring

Reason explaining the current status of the direct debit mandate, especially useful for failure cases.

urlstring

The URL where the customer can sign the direct debit mandate.

redirectUrlstring

The (optional) redirect URL to redirect the user after they sign the mandate

bankAccountNumberstring

The mandate bank account number

sortCodestring

The mandate sort code

bankAccountHolderNamestring

The mandate bank account holder name

personIdstring

The ID of the mandate person

scheme'BACS' | 'SEPA_CORE'

The direct debit scheme of the mandate

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      the //// response's property type changed from no type to object for status

    • breaking

      the //// response's property type changed from no type to object for status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      removed subschema #2 from the //// response property allOf list for the response status

    • info

      removed subschema #2 from the //// response property allOf list for the response status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status