ClearBank

Bacs

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

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

If you subscribe to the Bacs Direct Debit Inbound Payment Created and Bacs Direct Credit Inbound Payment Created 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 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

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 or Bacs Direct Debit Return Created 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. ClearBank will notify you with a 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

To return a Direct Debit use the endpoints below and specify the reason for return using a Direct Debit reason code. ClearBank will notify you with a 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

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 (real account)

post/v1/Accounts/{accountId}/Transactions/Returns

Creates a return of one or more Direct Debit or Direct Credit transactions for the account. This is only valid on the Entry Day, or the working day after before 15:30 UTC.

Parameters

  • accountId string, path, Required

    The unique identifier for the account. This can be retrieved from GET /v1/Accounts

  • Authorization string, header, Required

    Your API Token, retrieved from the web portal

  • DigitalSignature string, header, Required

    Signed hash of the body of the request. The hash is signed by your private key

  • X-Request-Id string, header, Required

    A unique identifier for the request

Request Payload (application/json)

  • returns array, Required

    Array of transactions to be returned

request

{
"returns": [
{
"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
"reasonCode": "string"
}
]
}
Code copied

Response (application/json)

  • 202 Success
  • 400 Bad Request
  • 404 Not Found

Success

{
"halLinks": [
{
"name": "string",
"href": "string",
"templated": true
}
]
}
Code copied

Bad Request

{
"errors": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Code copied

Associated Webhooks

Return Bacs payment (virtual account)

post/v1/Accounts/{accountId}/Virtual/{virtualAccountId}/Transactions/Returns

Creates a return of one or more Direct Debit or Direct Credit transactions for the virtual account

Parameters

  • accountId string, path, Required

    The unique identifier for the account. This can be retrieved from GET /v1/Accounts

  • virtualAccountId string, path, Required

    The unique identifier for the virtual account. This can be retrieved from GET /v1/Accounts/{accountId}/Virtual

  • Authorization string, header, Required

    Your API Token, retrieved from the web portal

  • DigitalSignature string, header, Required

    Signed hash of the body of the request. The hash is signed by your private key

  • X-Request-Id string, header, Required

    A unique identifier for the request

Request Payload (application/json)

  • returns array, Required

    Array of transactions to be returned

request

{
"returns": [
{
"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
"reasonCode": "string"
}
]
}
Code copied

Response (application/json)

  • 202 Success
  • 400 Bad Request
  • 404 Not Found

Success

{
"halLinks": [
{
"name": "string",
"href": "string",
"templated": true
}
]
}
Code copied

Bad Request

{
"errors": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Code copied

Associated Webhooks

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 Debit payment webhooks

The webhooks that relate to inbound Direct Debit payments have no direct association with an endpoint:

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 codes reference

The following tables give additional detail on the meanings of the various codes used in Bacs payments and returns.

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