--- title: "Bacs" metaTitle: "Bacs" order: 3 showPageMenu: true --- import EndpointBlock from "src/components/endpoint-block"; import * as DD_CONSTANTS from "./managing-direct-debit-instructions.constants" import WebhookPlaceholder from 'src/components/webhook-placeholder' import WebhookSummary from 'src/components/webhook-summary' ## Bacs Bacs operates on a three-day cycle. On the **input day**, a file of payments is sent to Bacs. ClearBank receives details of payments to be made on the **processing day**. Payments are applied to accounts on the **entry day**. Bacs does not operate on weekends or bank holidays. ![Image showing 3-day Bacs payment cycle](/assets/images/diagrams/uk/bacs/BacsOverview-Days.svg "Bacs payment cycle") As inbound Bacs payments can either be credit or debit payments, the successful payment scenario can result in money moving either to or from the end-customer's account. When a payment is successfully applied to an account, this message flow occurs: ![Image showing a successful Bacs payment](/assets/images/diagrams/uk/bacs/BacsOverview-PaymentSuccess.svg "Successful Bacs payment") If you subscribe to the [Bacs Direct Debit Inbound Payment Created](#bacs-direct-debit-inbound-payment-created-webhook) and [Bacs Direct Credit Inbound Payment Created](#bacs-direct-credit-inbound-payment-created-webhook) webhooks, then you can use the information to notify the account owner of a pending payment scheduled to occur on day 3. You can use the Bacs transaction ID to associate the webhooks that describe each payment. Note that credit payments can be recalled up to 4pm on the processing day by the originator; in this case you will be notified by a [Bacs Direct Credit Recalled webhook](#bacs-direct-credit-recalled-webhook) and the credit will not appear in the account. Whether a payment is successfully applied to the end-customer's account is determined like this: ![Image showing a Inbound Bacs decision tree](/assets/images/diagrams/uk/bacs/BacsOverview-DecisionTree.svg "Inbound Bacs decision tree") If the payment cannot be applied to the account, ClearBank will automatically raise an ARUCS (Automated Return of Unapplied Credits Service) item or an ARUDD (Automated Return of Unpaid Direct Debit) item. You will be notified with a [Bacs Direct Credit Return Created](#bacs-direct-credit-return-created-webhook) or [Bacs Direct Debit Return Created](#bacs-direct-debit-return-created-webhook) webhook. Note that if a Direct Debit is paid from a virtual account, it is your responsibility to ensure that the account has sufficient funds. If it does not, use the returns endpoints below. ## Returning a Bacs payment You can choose to return a payment that has been applied. Returns should be initiated straight away, but can be initiated until 15:30 (UTC) the working day after settlement. **To return a Direct Credit** use the endpoints below and specify the reason for return using a [Direct Credit reason code](#arucs-direct-credit-reason-codes). ClearBank will notify you with a [Bacs Direct Credit Return Created webhook](#bacs-direct-credit-return-created-webhook) on the day the return is created (Day 3 or 4). The funds will be transferred to your Bacs suspense account on the same day and returned on Day 5 or 6. The message flow is shown here: ![Image showing a Inbound Bacs decision tree](/assets/images/diagrams/uk/bacs/BacsOverview-ReturnsDC.svg "Message flow: Return a Direct Credit") **To return a Direct Debit** use the endpoints below and specify the reason for return using a [Direct Debit reason code](#arudd-direct-debit-reason-codes). ClearBank will notify you with a [Bacs Direct Debit Return Created webhook](#bacs-direct-debit-return-created-webhook) on the day the return is created (Day 3 or 4). The funds will be transferred from your Bacs suspense account to the end-customer's account on the same day and returned on Day 5 or 6. The rest of the message flow is similar to returning a Direct Credit and is shown here: ![Image showing a Inbound Bacs decision tree](/assets/images/diagrams/uk/bacs/BacsOverview-ReturnsDD.svg "Message flow: Return a Direct Debit") Use the endpoint below to return payments from a real account. To return payments from a virtual account, use: [/v1/Accounts/{accountId}/Virtual/{virtualAccountId}/Transactions/Returns](#return-bacs-payment-virtual-account) ## Bacs Direct Credit payment webhooks ClearBank does not sponsor Direct Credits, so there are no outbound Direct Credit payments. The webhooks relating to inbound Direct Credit transactions are not associated with an endpoint, instead they are listed here: - [Bacs Direct Credit Inbound Payment Created webhook](#bacs-direct-credit-inbound-payment-created-webhook) - [Bacs Direct Credit Recalled webhook](#bacs-direct-credit-recalled-webhook) - [Bacs Direct Credit Inbound Payment Held webhook](#bacs-direct-credit-inbound-payment-held-webhook) - [Transaction Settled webhook](#transaction-settled-webhook) - [Bacs Direct Credit Return Created webhook](#bacs-direct-credit-return-created-webhook) (this can occur automatically if ClearBank returns a payment, or in response to the Bacs returns endpoint) ## Bacs Direct Debit payment webhooks The webhooks that relate to inbound Direct Debit payments have no direct association with an endpoint: - [Bacs Direct Debit Inbound Payment Created webhook](#bacs-direct-debit-inbound-payment-created-webhook) - [Transaction Settled webhook](#transaction-settled-webhook) - [Bacs Direct Debit Return Created webhook](#bacs-direct-debit-return-created-webhook) (this can occur automatically if ClearBank returns a payment, or in response to the Bacs returns endpoint) - [Bacs Direct Debit Indemnity Claim Received Event webhook](#bacs-direct-debit-indemnity-claim-received-event-webhook) These two webhooks relate to the origination of Direct Debit payments as they appear in the **service user's account**. You would see these if you were collecting the Direct Debit rather than paying it: - [Bacs Debit Contra Received webhook](#bacs-debit-contra-received-webhook) - indicates funds received as a result of a Direct Debit file being processed. This is the bulk settlement. - [Bacs Unpaid Direct Debit Received webhook](#bacs-unpaid-direct-debit-received-webhook) - indicates that a Direct Debit could not be paid. ## Bacs codes reference The following tables give additional detail on the meanings of the various codes used in Bacs payments and returns. * [Bacs Transaction codes](#bacs-transaction-codes) * [ARUCS (Direct Credit) reason codes](#arucs-direct-credit-reason-codes) * [ARUDD (Direct Debit) reason codes](#arudd-direct-debit-reason-codes) ### Bacs Transaction codes
CodeDescription
01Direct Debit first collection
17Direct Debit regular collection, or credit contra (debit record to balance credit records)
18Direct Debit re-presentation
19Direct Debit final collection
99Direct Credit, or debit contra (credit record to balance debit records)
Z4Interest payments
Z5Dividend payments
### ARUCS (Direct Credit) reason codes
CodeReasonDescription
0Invalid detailsAccount details not recognised
2Beneficiary deceased 
3Account transferredAccount transferred to a new bank or building society
5No accountAccount number is not recognised at the Receiving Bank
BAccount closedBeneficiary has closed its account for an unknown reason
CRequested by RemitterRemitter has requested payment is not applied
### ARUDD (Direct Debit) reason codes
CodeReasonDescription
0Refer to payerA payer’s bank is not in a position to pay the Direct Debit; (for some reason other than the exception below). Or, the service of a Third Party Debt Order (formerly a Garnishee Order) or Arrestment on the payer’s account, his bankruptcy, liquidation or appointment of receiver
1Instruction cancelledInstruction cancelled by payer or their bank
2Payer deceased 
3Account transferredAccount transferred to a new bank or building society
4Advance notice disputedPayer disputes time, amount or frequency of advance notice and has requested single payment to be countermanded
5No account (OR wrong account type)Account number is not recognised at the paying bank
6No InstructionNo Instruction held with paying bank
7Amount differsPayer states the amount of the Direct Debit differs from the amount in the advance notice to payer
8Amount not yet duePayer states date of debiting is in advance of the due date specified in the advance notice to the payer. AUDDIS service users only – It is less than 2 working days since the DDI was lodged
9Presentation overduePayer states date of presentation is more than 3 working days after due date in the advance notice to payer Or, re-presentation of Unpaid Direct Debit is more than one month from original Direct Debit processing day
AService user differsIdentity of service user differs from DDI
BAccount closedPayer has closed their account for an unknown reason