Bacs Mandate Management

Setting up a Direct Debit Instruction

This template allows you to create a Direct Debit Instruction to process Direct Debits against Mambu deposit accounts. Direct Debit Instructions can be submitted to the paying bank in the following ways: Electronically via the Bacs Payment Schemes Limited (Bacs) or by Paper Instruction.

Sequence diagram of a Create Mandate flow between MPO, Mambu, and ClearBank

Direct Debit Instructions (DDIs) document an authorisation agreement between a debtor and a beneficiary to collect Direct Debits in Bacs. A Direct Debit Instruction is set up as a record of this agreement and is stored by both the beneficiary’s and the debtor’s bank.

Direct Debit Instructions adhere to Bacs' three-day cycle (consecutive working days):

  • Day 1: Input Day, when the instruction is submitted to Bacs.
  • Day 2: Processing Day, when the instruction is processed by Bacs and the BacsMandateInitiated webhook sent by ClearBank.
  • Day 3: Entry day
    • success: The instruction becomes effective.
    • failure: The BacsMandateInitiatedFailed webhook is sent by ClearBank and the instruction fails validation.

Creating a paper mandate

The Create Paper Mandate [API] process is manually triggered from Mambu Process Orchestrator (MPO) to create a Paper Direct Debit Instruction in ClearBank.

A successful response from ClearBank triggers the BacsMandateInitiated webhook, which confirms that the Direct Debit Instruction has been set up. The mandatesDetails custom field in Mambu is updated with the Service User Name and Mandate ID for the created mandate.

`mandatesDetails` [NETFLIX: 5bcb40d9-b904-438e-8696-1438ab82c968];

A failure response from ClearBank triggers the BacsMandateInitiatedFailed webhook, with a specific reason code. If the notification is set to true a task is created in Mambu or ZenDesk, based on the configuration of Notification Setup, with an error message.

Task created due to: Required field: 'depositAccountId' is missing for Deposit Account: LXNG616 using IBAN: GB84CLRB04062687167050. Paper Mandate
with mandate id: f153e6b6-220c-4623-ac76-07d9a9199264 was already created in ClearBank with SUN: 772353. Mambu custom field was not updated.
Process ID: 705999.

Reasons for failed initiation:

  • 5 - No account
  • B - Virtual account is closed
  • F - Real account is closed or does not accept Direct Debits
  • I - Reference is subset or superset of another item for that Service User Number (SUN) and account
  • K - The Paying Bank has cancelled the DDI for that Service User

For negative cases when the mandatesDetails custom field is not updated, a manual intervention is needed to correct the error. The mandatesDetails custom field in Mambu should be updated by adding the Originator name (identified in ClearBank as Service User Name) and Mandate ID.

The following format must be used for:

  • A single mandate: [Service User Name: Mandate ID];
  • Multiple mandates: [Service User Name1: Mandate ID1];[Service User Name2: Mandate ID2];

Creating electronic mandates

The Create AUDDIS Mandate [Bacs] process is automatically triggered when an Automated Direct Debit Instruction Service (AUDDIS) instruction is initiated from the Bacs system and the webhook BacsMandateInitiated is received in MPO. The Bacs service enables DDIs to be set up electronically setup by usin an 0N transaction.

ClearBank performs validation and screening on the received DDI and:

  • If the instruction is accepted: ClearBank sends the BacsMandateInitiated webhook confirming the DDI has been set up. After the AUDDIS instruction is created in ClearBank, the mandate details mandate ID and originator name are stored in Mambu in mandatesDetails custom field.
  • If the instruction is rejected: ClearBank sends a Bank Returned AUDDIS message followed by BacsMandateInitiatedFailed webhook, advising that the Direct Debit Instruction has been rejected - including the reason why.

Reasons for failed AUDDIS initiation:

  • 1 - Instruction cancelled by payer
  • 2 - Payer deceased
  • 3 - Account transferred
  • 5 - No account
  • 6 - No Instruction
  • 7 - DDI amount not zero
  • B - Account closed
  • C - Account transferred to a different branch of the Paying Bank
  • F - Invalid account type (account does not accept Direct Debits)
  • G - Paying Bank will not accept Direct Debits on account
  • H - Instruction has expired
  • I - Payer Reference is not unique
  • K - Instruction cancelled by Paying Bank for that Service User
  • L - Incorrect payer’s Account Details
  • M - Transaction Code / User Status incompatible
  • N - Transaction disallowed at payer’s branch
  • O - Invalid reference
  • P - Payer’s Name not present
  • Q - Service user’s name blank

Please Note:

After a paper mandate is created the Mandate Instruction Type displayed in ClearBank is Paper DDI. After an AUDDIS instruction is created the Mandate Instruction Type displayed in ClearBank is AUDDIS. Multiple AUDDIS instructions can be created at once using Bacs file.

Amending a Direct Debit Instruction

This template allows a payer to move their Direct Debit Instruction to another account in the same bank or financial institution.

Sequence diagram of an Amend Mandate flow between MPO, Mambu, and ClearBank

The Amend Mandate [Bacs] process is manually triggered from MPO when the debtor account for a Direct Debit Instruction needs to be changed, updated, or moved. The new debtor account must be a valid ClearBank account and must be linked to a Mambu deposit account through a virtual account. This flow applies for paper and AUDDIS instructions.

When the instruction is amended:

  • ClearBank stores the Service User Number and Reference against the new account.
  • ClearBank notifies the Service User of the Automated Direct Debit Amendment and Cancellation Service (ADDACS), advising of the change to the Instruction.
  • In Mambu the mandate details Service User Name and Mandate ID are first removed from the initial debtor account and then added to the new debtor account in the mandateDetails custom field on the deposit account level.

Reasons for ADDACS amendments:

  • 0 - Instruction cancelled - Refer to payer
  • 1 - Instruction cancelled by payer
  • 2 - Payer deceased
  • 3 - Account transferred to a new PSP
  • B - Account closed
  • C - Account transferred to a different branch of a PSP
  • D - Advance notice disputed
  • E - Instruction amended
  • R - Instruction re-instated

For negative flows, if a notification is set to true then a task is created in Mambu or ZenDesk, based on the configuration of Notification Setup, with an error message.

Task created due to: Required field: 'depositAccountId' is missing for Deposit Account: LXNG616. Amend Mandate with ID: f153e6b6-220c-4623-ac76-07d9a9199264
and SUN: 772353 FROM Debtor IBAN: GB84CLRB04062687167050 TO Debtor IBAN: GB44CLRB04062677003916 was done in ClearBank. Mambu Custom Field was not updated
(add). Process ID: 705999.

If the mandatesDetails custom field is not updated, a manual intervention is needed to correct the error. The mandatesDetails custom field in Mambu should be updated as following:

  • Add the Originator name, identified in ClearBank as Service User Name, and Mandate ID for the new deposit account.
  • Remove the mandate details Originator name and Mandate ID from the initial deposit account - including the square brackets.

The following format must be used:

  • A single mandate: [Service User Name: Mandate ID];
  • Multiple mandates: [Service User Name1: Mandate ID1];[Service User Name2: Mandate ID2];

Reason codes for amending a Direct Debit Instruction:

  • C - Account transferred to a different branch of bank/building society
  • E - Instruction amended

Please Note:

When amending a Direct Debit Instruction no webhook is triggered by ClearBank. The new account may be held on the same Sort Code as the original account, or on a different sort code issued to the same Paying Bank.

Migrating a Direct Debit Instruction

This template allows you to migrate a Paper Direct Debit Instruction to AUDDIS via the Bacs system.

Sequence diagram of a Paper Direct Debit Instruction migration flow between MPO, Mambu, and ClearBank

The process is automatically triggered when the migration cycle of a Paper Direct Debit Instruction to AUDDIS is initiated from the Bacs system and the BacsMandateMigrated webhook is sent by ClearBank and received in MPO. The BacsMandateMigrated webhook details are stored in the Mandate Migrated Receiver process used only for acknowledgement purpose.

After the Paper Direct Debit Instruction is migrated, in the ClearBank UI the Mandate Instruction Type value is updated from Paper DDI to Migrated. Therefore, no updates are needed in Mambu. The Bacs service enables DDI to be electronically migrated by using 0S transactions.

Please Note:

Only Paper Mandates can be migrated and multiple paper mandates can be migrated at once using Bacs system. In case of failure no webhook is sent by ClearBank.

Cancelling a Direct Debit Instruction

This template allows you to cancel a DDI via the ClearBank UI, the Bacs system, or the ClearBank API.

Sequence diagram of a Cancel Mandate flow between MPO, Mambu, and ClearBank

Cancel mandates using the ClearBank UI or the Bacs system

The Cancel Mandate [UI | Bacs] process is automatically triggered when the cancellation cycle of a Paper or AUDDIS Direct Debit Instruction is initiated from the ClearBank UI or the Bacs system file and the BacsMandateCancelled webhook is received in MPO.

A DDI can be cancelled by the Payer, by the bank, or by the Service User:

  • Cancelled by Payer: The cancellation reason is Cancelled by Payer.
  • Cancelled by the bank: The cancellation reason is Cancelled by Paying Bank.
  • Electronically cancelled by the Service User: The cancellation reason is the AUDDIS 0C transaction code.

If the cancellation request is accepted, ClearBank sends the BacsMandateCancelled webhook confirming the DDI has been cancelled and also sends the ADDACS message to the Service User. After the DDI is cancelled in ClearBank, in Mambu the corresponding values [Service User Name: Mandate ID]; are removed from mandatesDetails custom field.

Reasons for ADDACS cancellations:

  • 0 - Instruction cancelled - Refer to payer
  • 1 - Instruction cancelled by payer
  • 2 - Payer deceased
  • 3 - Account transferred to a new PSP
  • B - Account closed
  • C - Account transferred to a different branch of a PSP
  • D - Advance notice disputed
  • E - Instruction amended
  • R - Instruction re-instated

When a DDI is electronically cancelled by the Service User, ClearBank checks that the cancellation matches a known Direct Debit Instruction. If it is not matched, ClearBank notifies the Service User of the error using a Bank Returned AUDDIS message and sends the BacsMandateCancellationFailed webhook.

For negative cases, if the notification is set to true a task is created in Mambu or ZenDesk, based on the configuration of Notification Setup, with an error message.

Reasons for failed AUDDIS cancellations:

  • 1 - Instruction cancelled by payer
  • 2 - Payer deceased
  • 3 - Account transferred
  • 5 - No account
  • 6 - No Instruction
  • 7 - DDI amount not zero
  • B - Account closed
  • C - Account transferred to a different branch of the Paying Bank
  • F - Invalid account type (account does not accept Direct Debits)
  • G - Paying Bank will not accept Direct Debits on account
  • H - Instruction has expired
  • I - Payer Reference is not unique
  • K - Instruction cancelled by Paying Bank for that Service User
  • L - Incorrect payer’s Account Details
  • M - Transaction Code / User Status incompatible
  • N - Transaction disallowed at payer’s branch
  • O - Invalid reference
  • P - Payer’s Name not present
  • Q - Service user’s name blank

Please Note:

Multiple mandates can be cancelled using the Bacs system. After cancellation by Paying Bank, the Service User cannot set up further DDIs on that account. This is usually used when the bank wants to close the account.

Cancel mandates using the ClearBank API

The Cancel Mandate [API] process is manually triggered from MPO when a cancellation of an Paper or AUDDIS Direct Debit Instruction is initiated. Before sending the cancellation request to ClearBank, the link between the Mambu deposit account and the ClearBank virtual account is verified and then the mandate that needs to be cancelled is identified in ClearBank.

A successful response from ClearBank triggers the BacsMandateCancelled webhook, which confirms that the DDI was cancelled, and also sends the ADDACS message to the Service User. In Mambu the mandatesDetails custom field is updated by removing the Service User Name and Mandate ID from the deposit account.

A failure response from ClearBank triggers the BacsMandateInitiatedFailed webhook, with a specific reason code. If the notification is set to true a task is created in Mambu or ZenDesk, based on the configuration of Notification Setup, with an error message.

For negative cases, when the mandatesDetails custom field is not updated, a manual intervention is needed to correct the error. The mandatesDetails custom field in Mambu should be updated by removing the Originator name, identified in ClearBank as Service User Name, and Mandate ID.

Reasons for cancelling a Direct Debit Instruction via API:

  • 0 - Institution cancelled - refer to payer. Paying bank has cancelled instruction.
  • 1 - Instruction cancelled by payer. Payer has instructed the paying bank to cancel the DirectDebit Instruction (Mandate).
  • 2 - Payer deceased.
  • B - Account closed. Payer has closed their account for an unknown reason.

Returning a Direct Debit Instruction

ClearBank Retail Banking: Return Mandate

The Return AUDDIS Mandate [API] process is manually triggered from MPO. This flow applies for returning an existent AUDDIS Instruction created on the same day using ClearBank APIs. Before sending the return request to ClearBank, the link between the Mambu deposit account and the ClearBank virtual account is verified and then the DDI that needs to be returned is identified in ClearBank.

A successful response from ClearBank triggers the BacsMandateReturned webhook, which confirms that the AUDDIS Instruction has been returned. In Mambu the mandatesDetails custom field is updated by removing the Service User Name and Mandate ID from the deposit account.

A failure response from ClearBank triggers the BacsMandateInitiatedFailed webhook, with a specific reason code. If the notification is set to true a task is created in Mambu or ZenDesk, based on the configuration of Notification Setup, with an error message.

Rejection codes*for returning an AUDDIS mandate:

  • 1 - Instruction cancelled by payer
  • 2 - Payer deceased
  • 3 - Account transferred
  • 5 - No account
  • 6 - No Instruction
  • B - Account closed
  • C - Account transferred to a different branch of the bank/building society
  • F - Invalid account type
  • G - Bank will not accept Direct Debits on account
  • H - Instruction has expired
  • I - Payer Reference is not unique
  • K - Instruction cancelled by paying bank

For negative cases, when the mandatesDetails custom field is not updated, a manual intervention is needed to correct the error. The mandatesDetails custom field in Mambu should be updated by removing the Originator name, identified in ClearBank as Service User Name, and Mandate ID.

Please Note:

A returned AUDDIS mandate is displayed in ClearBank as Cancelled and paper mandates will need to be returned via post or cancelled,if needed.