BACS - Inbound Payments

This template allows you to use ComplyAdvantage’s Anti-Money Laundering (AML) feature for monitoring ClearBank transactions to identify and stop potential money laundering or terrorist financing activities.

Transaction monitoring is the processing of transactions against a series of rules to look for suspicious or fraudulent activity. The Webhook Listener Router [AWS] process is automatically triggered when a transaction is initiated from Mambu or any other system and its purpose is to decide if the transaction is Inbound or Outbound. If the payment type received is invalid then the error message is stored in Error Handling state diagram.

Once the transaction details are read and processed in the Mambu Process Orchestrator (MPO) processes Outbound Payment [Reading | Processing] or Inbound Payment [Reading | Processing] then the transaction details are sent to ComplyAdvantage.

Inbound Direct Credit Payment

Inbound Direct Credit

An inbound Direct Credit payment is initiated from Bacs system and BacsDirectCreditInboundPaymentCreated is received in MPO. After the payment type is identified in the WebHook Retailers Receiver the payload it is routed to Direct Credit Webhook Receiver process. A Direct Credit payment is sent to be monitored on Day 2 when BacsDirectCreditInboundPaymentCreated is sent and received in MPO.

The Payment Receiver Router [Outbound & Inbound] process is automatically triggered when a transaction is sent and routed to the Inbound Payment [Reading | Processing] process. After the transaction is posted in ComplyAdvantage the AML status returned can be: Accepted, Rejected or Suspended. The corresponding manual journal entries are logged in accounting.

If the payment status is:

  • Accepted: a Deposit transaction will be posted in Mambu on Day 3 once ClearBank will send TransactionSettled webhook.
  • Rejected: based on the rejection day the Direct Credit payment might be or not returned in ClearBank as follows:
    • if the rejection occurs until/on Day 4 of Bacs cycle the Direct Credit payment will be returned in ClearBank and funds be moved to Scheme account.
    • if the rejection occurs after Day 4 of Bacs cycle the the Direct Credit payment cannot be returned anymore in ClearBank, a notification will be send and the funds will be moved into Withhold account.
  • Suspended: once all the alerts are transitioned from In Review to an end state of Accepted or Rejected webhooks are sent by ComplyAdvantage and automatically trigger the MPO process Alerts Analyser Router [to be linked to CA]and corresponding manual journal entries are logged in the accounting. The final status of a Suspended transaction can be Accepted or Rejected.

Since a payment might be Suspended in ComplyAdvantage for a longer period of time until it will be reviewed, and Bacs Direct Credit is a 3-day cycle (three UK consecutive working days), TransactionSettled webhook which is sent on Day 3 can be received before or after the final AML status of a transaction is known.

In the case of Suspended payments, when TransactionSettled from Day 3 is sent:

  • after the final AML status, the transaction is stored in the Accepted or Rejected state until TransactionSettled webhook is sent and received in MPO.
  • before the final AML status, the transaction is stored in the Suspended state until a final AML status from ComplyAdvantage is received.

If the Suspended transaction will be released as:

  • Accepted: a Deposit transaction will be posted in Mambu regardless of the day it was released by ComplyAdvantage.
  • Rejected: only if the difference between the ComplyAdvantage transaction webhook date and the TransactionSettled webhook date is strictly smaller than 2 (equivalent of Day 3 and Day 4 of Bacs cycle) a Direct Credit return will be triggered and funds be moved into Scheme account, otherwise the return cannot be initiated anymore in ClearBank, the funds will be moved into Withhold account and a notification is sent.

Notes:

Inbound Direct Credit Recall

A Bacs Direct Credit may be recalled (cancel processing of the payment) by the Service User’s Payment Service Provider (PSP) up until 15:45 on Day 2 of the Bacs processing cycle. ClearBank will manage recall requests on client behalf. A recalled Bacs Direct Credit will not be applied to client’s account.

Sequence diagram

ClearBank Retail Banking: Inbound Direct Credit Recalled

Since a Direct Credit payment is sent to be monitored on Day 2 when BacsDirectCreditInboundPaymentCreated is received in MPO, and also the recall can be made on Day 2 the following logic applies based on the AML status:

If the payment status is:

  • Accepted or Rejected: funds are moved to Scheme account since no payment was applied to the client’s account.
  • Suspended: funds are moved to Scheme account regardless of when all the alerts are reviewed and transitioned from In Review to an end state of Accepted or Rejected (before/after Day 4).

Since a payment might be Suspended in ComplyAdvantage for a longer period of time until it will be reviewed, and Bacs Direct Credit is a 3-day cycle (three UK consecutive working days), BacsDirectCreditRecalled webhook which is sent on Day 2 with field source = Bacs, can be received before or after the final AML status of a transaction is known. Regardless of when a final AML status (Accepted or Rejected (before/after Day 4)) will be sent, the funds are moved to Scheme GL from the Suspended state since the payment was already recalled. When webhooks are sent by ComplyAdvantage and automatically trigger the MPO process Alerts Analyser Router [to be linked to CA] the payload will be ignored since the payment was already recalled in ClearBank.

Since receiving the BacsDirectCreditRecalled webhook, means that the Direct Credit payment was cancelled, a notification is sent based on the Notification Setup configuration with the payment details send from ClearBank with the following message:

Task created due to: BACS Direct Credit Payment was Recalled. Task was created from MPO for: Transaction Type: DirectCredit, Bacs Transaction ID: a761c3f2-c22h-2j7a-228c-b23rf3685c1e, Transaction Status: Recalled, Service User Number: 916201, RecallReference: DCMRCHRECALL for Mambu Creditor with Account Number: 00000192. Process ID: 43967.

Note:

  • In case the payment is still in Pending state when BacsDirectCreditRecalled is received on Day 2 it will be stored in the AML Pending state and be routed accordingly to another state (Accepted, Rejected or Suspended) once a response is received from ComplyAdvantage. Once the AML state is known the funds will be sent to Scheme GL.

Inbound Direct Credit Returns

When a Direct Credit payment cannot be applied for any reason, the funds will be returned no later than Day 5 (Day 3 of ARUCS) of the Bacs processing cycle. In the connector three types of return are handled:

  • automatic return
  • manual return from APIs (active on Day 3 and Day 4 of BACS cycle)
  • manual return from ClearBank Portal UI (active only on Day 3 of BACS cycle)

Automatic Returns

An Automated Return of Unapplied Credit Service (ARUCS) report will be generated by Bacs advising that the payment has not been applied and providing reasons why.

Sequence diagram

ClearBank Retail Banking: Inbound Direct Credit Automatic Return

ClearBank automatically returns a Direct Credit as unapplied if the destination account is unknown or is disabled or cannot accept credits. BacsDirectCreditReturnCreated webhook is sent by ClearBank on Day 3 and the payment is re-routed to Bacs Suspense account and then use the ARUCS process to return the funds. Since no corresponding Deposit(Credit) transaction exists in Mambu, TransactionSettled (Debit) webhook sent by ClearBank on Day 5, will be acknowledged but will not be followed by any action in the connector since the original Credit transaction sent on Day 3 was already returned in ClearBank.

Since a Direct Credit payment is sent to be monitored on Day 2 when BacsDirectCreditInboundPaymentCreated is received in MPO, and the automatic return can be made starting with Day 3 when TransactionSettled webhook is sent with Bacs Suspense IBAN Account, the following logic applies based on the AML status:

If the payment status is:

  • Accepted or Rejected: funds are moved to Scheme account since the payment is already returned in ClearBank.
  • Suspended: funds are moved to Scheme account regardless of when all the alerts are reviewed and transitioned from In Review to an end state of Accepted or Rejected (before/after Day 4).

Since a payment might be Suspended in ComplyAdvantage for a longer period of time until it will be reviewed, and Bacs Direct Credit is a 3-day cycle (three UK consecutive working days), TransactionSettled webhook which is sent on Day 3 can be received before or after the final AML status of a transaction is known. Regardless of when a final AML status (Accepted or Rejected (before/after Day 4)) will be sent, the funds are moved to Scheme account from the Suspended state since the payment was already returned by ClearbBank. When webhooks are sent by ComplyAdvantage and automatically trigger the MPO process Alerts Analyser Router [to be linked to CA] the payload will be ignored since the payment was already returned in ClearBank.

When a Direct Credit payment is automatically returned by ClearBank, in MPO a notification is sent based on the Notification Setup configuration in Mambu/Zendesk with the following message:

Task created due to: BACS Direct Credit Payment was Automatic Returned by ClearBank. Task was created from MPO for: Transaction Type: DirectCredit, Bacs Transaction ID: a1629572-a4c1-4fa2-b47d-6145866fb630, Transaction Status: Settled, Service User Number: 710011 for Mambu Creditor with IBAN: GB41CLRB04071700000036. Process ID: 43967.

Note:

  • In case the payment is still in Pending state when TransactionSettled as an automatic return is received on Day 3 it will be stored in the AML Pending state and be routed accordingly to another state (Accepted, Rejected or Suspended) once a response is received from ComplyAdvantage. Once the AML state is known the funds will be sent to Scheme account.

Manual Returns via APIs

If a Bacs Direct Credit payment cannot be applied to the destination account due to, for example, the account was transferred or Mambu deposit account is an invalid state to receive transactions, ClearBank sends an ARUCS message to the Service User, and the funds will be debited from the Suspense account and credited to the originator.

Sequence diagram

ClearBank Retail Banking: Inbound Direct Credit Return via API

ClearBank BacsDirectCreditReturnCreated webhook is sent with the source Api when a return via APIs is initiated on Day 3 (Day 1 of ARUCS) or in exceptional cases Day 4 (Day 2 of ARUCS) with the reason code 0 - Refer to payer as to why the payment was unapplied. The ARUCS payments are identified by transaction code RA in the Bacs input record.

A Direct Credit payment is sent to be monitored on Day 2 when BacsDirectCreditInboundPaymentCreated is received in MPO, and the manual return via APIs can be made starting with Day 3 when TransactionSettled webhook is sent, the following logic applies based on the AML status:

If the payment status is:

  • Accepted: Inbound Direct Credit - Deposit [API] process is triggered
  • Rejected: based on the rejection day the Direct Credit payment might be or not returned in ClearBank as follows:
    • if the rejection occurs until/on Day 4 of Bacs cycle the Direct Credit payment will be returned in ClearBank via APIs and the funds be moved to Scheme account.
    • if the rejection occurs after Day 4 of Bacs cycle then the Direct Credit payment cannot be returned anymore in ClearBank, a notification will be sent and the funds will be moved into Withhold account.
  • Suspended: once all the alerts are transitioned from In Review to an end state of Accepted or Rejected, webhooks are sent by ComplyAdvantage and automatically trigger the MPO process Alerts Analyser Router [to be linked to CA]and corresponding manual journal entries are logged in the accounting. The final status of a Suspended transaction can be Accepted or Rejected.

Since a payment might be Suspended in ComplyAdvantage for a longer period of time until it will be reviewed, and Bacs Direct Credit is a 3-day cycle (three UK consecutive working days), TransactionSettled webhook which is sent on Day 3 can be received before or after the final AML status of a transaction is known.

In the case of Suspended payments, when TransactionSettled from Day 3 is sent:

  • after the final AML status, the transaction is stored in the Accepted or Rejected state until TransactionSettled webhook is sent and received in MPO.
  • before the final AML status, the transaction is stored in the Suspended state until a final AML status from ComplyAdvantage is received.

If the Suspended transaction will be released as:

  • Accepted: Inbound Direct Credit - Deposit [API] process is triggered regardless of the day ComplyAdvantage releases the transaction
  • Rejected: only if the difference between the ComplyAdvantage transaction webhook date and the TransactionSettled webhook date is strictly smaller than 2 (equivalent of Day 3 and Day 4 of Bacs cycle) a Direct Credit return will be triggered via APIs and the funds be moved into Scheme account, otherwise the return cannot be initiated anymore in ClearBank, the funds will be moved into Withhold account and a notification is sent for manual reconciliation.

If the Deposit transaction cannot be posted to Mambu Deposit Account due to, deposit account state is invalid, manual return process via ClearBank APIs is initiated using as return code: 0 - Refer to payer, funds are moved to Scheme account and a notification as [INFO] is sent. If the return is not active anymore then a notification is sent, funds are moved to Withhold account, and the client will return the funds to the originator (manual reconciliation). Since no corresponding Deposit(Credit) transaction exists in Mambu, TransactionSettled (Debit) webhook sent by ClearBank on Day 5 with field IsReturned = true, will be acknowledged but will not be followed by any action in the connector since the original Credit transaction was already returned in ClearBank.

When a Direct Credit payment is manually returned via ClearBank APIs, in MPO a notification is sent based on the Notification Setup configuration in Mambu/Zendesk with the following message:

Task created due to: INVALID_DEPOSIT_ACCOUNT_STATE Transaction with ID: db29d6f0-a8a1-404d-be1e-ea24313d2ed4 initiated by Mambu was Returned via APIs. . Task was created from MPO for payment scheme: Bacs, Transaction Type: DirectCredit, Bacs Transaction ID: fe2dcdc6-8e18-406c-bb66-a4c4668bfbb9, EndToEnd transaction ID: fe2dcdc68e18406cbb66a4c4668bfbb9, Service User Number: 710011, transaction Identifier Field Ref: 04071700000192DEMORET040717000001920000000200020220530 for Deposit Account: WEPG115 Process ID: 44060.

When a Direct Credit payment is manually returned via ClearBank APIs but fails, in MPO a notification is sent based on the Notification Setup configuration in Mambu/Zendesk with the following message:

Task created due to: INVALID_DEPOSIT_ACCOUNT_STATE ClearBank API error : {“d72a0e65-795a-4f88-a178-a6471e7612a8”:[“NotBacsTransaction”]} Validation Error ClearBank API error for creating a DD/DC transaction return Direct Credit Transaction in Clearbank was not Returned via APIs. Manual Intervention needed! Potential actions: return the Direct Credit from ClearBank Portal UI or contact ClearBank support. . Task was created from MPO for payment scheme: Bacs, Transaction Type: DirectCredit, Bacs Transaction ID: 5dc9839d-e16f-4ef0-a948-725b0cb0e996, EndToEnd transaction ID: 5dc9839de16f4ef0a948725b0cb0e996, Service User Number: 710011, transaction Identifier Field Ref: 04071700000192DEMORET040717000001920000005020020220526 for Deposit Account: WEPG115 Process ID: 44015 .

Manual Returns via UI

Manual return via ClearBank Portal UI can be triggered on demand only on Day 3 or when an intial return via ClearBank APIs failed. ClearBank BacsDirectCreditReturnCreated webhook is sent when a return via Clearbank Portal UI is initiated on Day 3 (Day 1 of ARUCS) with a scpecific reason code, as to why the payment was unapplied. The ARUCS payments are identified by transaction code RA in the Bacs input record.

Sequence diagram

ClearBank Retail Banking: Inbound Direct Credit Return via UI

A Direct Credit payment is sent to be monitored on Day 2 when BacsDirectCreditInboundPaymentCreated is received in MPO, and the manual return via ClearBank Portal UI can be made only on Day 3 when TransactionSettled webhook is sent and received in MPO. The following logic applies based on the AML status:

  • Accepted: Inbound Direct Credit - Deposit [API] process is triggered and a Deposit transaction is created in Mambu. When the return is made from ClearBank Portal UI the following webhooks will be sent to MPO:

    • TransactionSettled - Credit with scheme Transfer and Bacs Suspense Account IBAN, which is acknowledged in MPO (no action is taken)
    • TransactionSettled - Debit with scheme Transfer and Bacs Suspense Account IBAN, which is acknowledged in MPO (no action is taken)
    • BacsDirectCreditReturnCreated with scheme Bacs, source Portal and OriginalBacsTransactionId field which represents the linkage between the intitial TransactionSettled received on Day 3 and the returned transaction. The OriginalBacsTransactionId field is stored in BACS Return Webhooks from CB UI state diagram from MPO along with the returnSource and returnReasonCode.
    • When TransactionSettled - Credit with scheme Bacs is sent on Day 5, first the Deposit transaction is searched in Mambu by the OriginalBacsTransactionId. If a Deposit transaction is found then it is adjusted by posting a Withdrawal transaction in Mambu using the transaction channel CB_Return_BACS. In case the Deposit transaction is not found due to the fact it was not created a notification is sent.
  • Rejected: manual return via ClearBank Portal UI is not applicable for AML Rejected since for this state the return is handled always via ClearBank APIs. This can be triggered only when the return via APIs failed on Day 3. Since no corresponding Deposit(Credit) transaction exists in Mambu, TransactionSettled (Debit) webhook sent by ClearBank on Day 5 with field IsReturned = true, will be acknowledged but will not be followed by any action in the connector since the original Credit transaction was proccesed only in ClearBank.

  • Pending and Suspended: when BacsDirectCreditReturnCreated is sent with source Portal and the transaction is still Suspended or Pending in MPO, the funds are sent to Scheme since the payment was already returned from ClearBank UI, and a notification as [INFO] is sent regardless of when a final AML status (Accepted or Rejected (before/after Day 4)) will be sent. When webhooks are sent by ComplyAdvantage and automatically trigger the MPO process Alerts Analyser Router [to be linked to CA] the payload will be ignored since the payment was already returned in ClearBank. Since no corresponding Deposit(Credit) transaction exists in Mambu, TransactionSettled (Debit) webhook sent by ClearBank on Day 5 with field IsReturned = true, will be acknowledged but will not be followed by any action in the connector since the original Credit transaction was already returned in ClearBank.

When a Direct Credit payment is manually returned via ClearBank Portal UI, in MPO a notification is sent based on the Notification Setup configuration in Mambu/Zendesk with the following message:

[INFO] A return transaction has been initiated from ClearBank Portal UI for the Direct Credit payment with Bacs Transaction ID: e24e2f64-b781-4a03-b3ad-3d4eca813732, End to End Transaction ID: e24e2f64b7814a03b3ad3d4eca813732 and return reason code 0. The Direct Credit payment was successfully reversed in Mambu by posting a Withdrawal transaction with ID [374707] and encoded key [8a015a8e81141878018114eae365035b].

Error Handling

As part of error handling, in case a failure occurs during the execution regardless of the source (Mambu, MPO, ComplyAdvantage, ClearBank) the following actions will be taken in the connector:

  • when the return via APIs in ClearBank is active (Day 3 and/or Day 4 of Bacs cycle), the payment will be returned from MPO using as return code: 0 - Refer to payer, funds are moved to Scheme account and at least one notification is sent with the reason of failure. Inbound Direct Credit transaction in ComplyAdvantage remains Active.
  • when the return via APIs in ClearBank is active (Day 3 and/or Day 4 of Bacs cycle) but fails, the payment will be returned manually by the client, funds are moved to Scheme account and at least one notification is sent with the reason of failure. Inbound Direct Credit transaction in ComplyAdvantage remains Active.
  • when the return via APIs in ClearBank is not active (after Day 4 of Bacs cycle), the payment will be returned manually by the client, funds are moved to Scheme account and at least one notification is sent with the reason of failure. Inbound Direct Credit transaction in ComplyAdvantage remains Active.

For Suspended payments failures that are triggered in 1. Alerts Analyser Router [to be linked to CA] process, in case the accounting was not posted or fails for a final known AML status (Accepted or Rejected), this part is re-tried in the error handling logic and posted. In case the final AML status is not known yet (still Suspended) and an error occurs posting the accounting (Debit Suspense and Credit Transit) is skipped from the error handling mechanism and, the funds are sent to scheme directly from Suspense account (Debit Suspense and Credit Scheme).

In case Modify Task Send AML status to BACS State Diagram node from 1.1 Alerts Analyser fails, this part is re-tried in the error handling logic and the [BACS] FinCrime AML Transaction state diagram is updated with the correct AMLstatus, thefore the flow continues as a happy flow and not a failure, and a notification is sent with the reason of failure as an INFO.

Notes:

  • A Direct Credit can be returned via ClearBank UI until Day 3 and via API’s until Day 4 of BACS cycle.
  • In case the payment is still in Pending state when TransactionSettled is received on Day 3 it will be stored in the AML Pending state and be routed accordingly to another state (Accepted, Rejected or Suspended) once a response is received from ComplyAdvantage. When the AML state is known flow will continue.
  • Manual return via ClearBank Portal UI is not applicable for AML Rejected since for this state the return is handled always via ClearBank APIs.
  • In case the Deposit transaction needs to be manually posted in Mambu as part of reconciliation process, transaction channel CB_Deposit_Bacs must be used since the payment is already made in ClearBank.
  • If there are insufficient funds to post the Withdrawal transaction as part of return process, a notification as [INTERVENTION NEEDED] is sent. After the funds are in place and the Withdrawal can be made in Mambu, transaction channel CB_Return_BACS must be used since the payment is already returned in ClearBank.
  • In case a returned payment comes with BacsDirectCreditReturnCreated webhook scheme Bacs, but source Undefined the payload will not be stored in any states and a notification will be sent with Unknown Direct Credit Return Created Payload Source message.
  • For some failures two duplicate notifications might be sent due to ComplyAdvantage logic in releasing the webhooks based on how the same type of alerts were reviewed (bulk or one by one).