Create sequence diagrams with simple online tool

Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.

Title: Inbound Direct Debit Manual Return via APIs with FinCrime _:{fa-check-circle} _Prerequisites_ note: * ClearBank **IBAN** is mapped to Mambu Deposit account & **Virtual Account ID** is linked to Deposit Account * **Client Money Account** & **Bacs Suspense Account** are Available and Active * **Deposit Account** is Active | Approved * `monitorDirectDebitTransaction` is `true` in Mambu Config * **Accounting** is configured at `Deposit Product` level group:**Bacs: three-day processing cycle** _: **`Day 1 of Bacs Processing Cycle`** Bacs --> Bacs: **Input Day**: The Service User submits the payment to Bacs _: **`Day 2 of Bacs Processing Cycle`** ClearBank --> ClearBank: **The Processing Day**: Payment details are validated Bacs --> ClearBank: _Bacs_ outputs to _ClearBank_ ClearBank ->> MPO: {fa-assistive-listening-systems} **BacsDirectDebitInboundPaymentCreated** webhook is sent MPO -->> ClearBank: Confirm received webhook MPO -> MPO: AML status: `Pending` MPO --> Mambu: *Accounting*: (Debit) Scheme & (Credit) Transit MPO -> ComplyAdvantage: Submit **transaction** to ComplyAdvantage _:{fa-cogs} Alerts Review if:{fa-check-circle} `Accepted` transaction MPO -->>MPO:{fa-thumbs-up} AML status: `Accepted` MPO -->>MPO: {fa-box} Store the payment in AML _Accepted_ state note_: {fa-flag} **Accepted** Flow continues on `Day 3 of Bacs Processing Cycle` end _: **`Day 3 of Bacs Processing Cycle`** ClearBank ->> MPO: {fa-assistive-listening-systems} **TransactionSettled** (_Debit_) webhook is sent MPO -->> ClearBank: Confirm received webhook if:{fa-check-circle} AML Accepted note_: Process `Inbound Direct Debit - Withdrawal [API]` is triggered but fails MPO -> ClearBank: Initiate **Return** transaction in ClearBank via APIs => `manualReturn` = **true** MPO --> Mambu: *Accounting*: (_Debit_) Transit & (_Credit_) Scheme MPO -->>MPO: {fa-box} Store the payment in _Return_ state end if:{fa-check-circle} AML Rejected note_: Process `Inbound Direct Debit - Withdrawal [API]` is triggered but fails MPO -> ClearBank: Initiate **Return** transaction in ClearBank via APIs => `manualReturn` = **true** MPO --> Mambu: *Accounting*: (_Debit_) Transit & (_Credit_) Scheme MPO -->>MPO: {fa-box} Store the payment in _Return_ state end if:{fa-check-circle} AML Suspended note_: Process `Inbound Direct Debit - Withdrawal [API]` is triggered but fails MPO -> ClearBank: Initiate **Return** transaction in ClearBank via APIs => `manualReturn` = **true** MPO --> Mambu: *Accounting*: (_Debit_) Transit & (_Credit_) Scheme MPO -->>MPO: {fa-box} Store the payment in _Return_ state _:{fa-bell} Send **Notification** end _: **`Day 3 (Day 1 of ARUDD Cycle)`** ClearBank --> ClearBank: **Input Day**: Return is initiated ClearBank ->> MPO: {fa-assistive-listening-systems} **BacsDirectDebitReturnCreated** webhook is sent -> `scheme` = _API_ MPO -->> ClearBank: Confirm received webhook _: **`Day 4 (Day 2 of ARUDD Cycle)`** Bacs --> Bacs: **Processing Day**: return details are validated (_contras_) _: **`Day 5 (Day 3 of ARUDD Cycle)`** ClearBank --> ClearBank: **The Entry Day**: Settlement of the funds if:** settlement is made** ClearBank ->> MPO: {fa-assistive-listening-systems} **TransactionSettled** (_Credit_) webhook is sent with `IsReturned` = _true_ MPO -->> ClearBank: Confirm received webhook note_: {fa-flag} Payload is ignored since the payment is already Returned in Clearbank and there is no Withdrawal transaction in Mambu else:** settlement is NOT made** ClearBank ->> MPO: {fa-assistive-listening-systems} **BacsCreditPaymentNotSettled** webhook is sent MPO -->> ClearBank: Confirm received webhook _:{fa-bell} Send **Notification** end note_: {fa-flag} After Alerts are reviewed for an Accepted payment with action `I` (Ignore) or Suspended payment ComplyAdvantage -->> ComplyAdvantage: Accept/Reject `In Review` alerts ComplyAdvantage -->> MPO: {fa-assistive-listening-systems} **Alerts** webhook(s) triggered by ComplyAdvantage ComplyAdvantage -->> MPO: **1.** Send AML Review Results (`Accept` OR `Reject`) MPO -->> MPO: {fa-thumbs-up} AML status: `Accepted` note_: Transaction AML status is `Ignored`, action = `Skip`. Payment was already returned. MPO -->> MPO: {fa-thumbs-down} AML status: `Rejected` note_: Transaction AML status is `Ignored`, action = `Skip`. Payment was already returned. ComplyAdvantage -->> MPO: **2.** Send AML Review Results (`Accept` AND `Reject`) MPO -->> MPO: AML status `Invalid`