Be notified when direct debit instructions are rejected or returned

Steps

  • After having registered a direct debit mandate, the debtor’s bank might issue an ADDACS report, amending or cancelling direct debit mandates
  • When receiving such reports, Mambu Payments will automatically update or cancel the related mandate objects

Payment is rejected by Bacs

sequenceDiagram
		participant C as Customer
    participant N as Mambu Payments
    participant S as Bacs
    autonumber

		C->>N: POST /payment_orders<br>direct_debit_mandate_id = xxx
		N->>N: Create direct debit payment orders
		N-->>C: Event payment_order:approved
		N->>S: Send DDI file
		N-->>C: Event payment_order:sent
		S->>N: Receive Input Report
		N->>N: Process Input Report
		
		loop iterate over Input report entries
			N-->>C: Event payment_order:rejected
			opt If rejection code is final (closed account, etc.)
				N->>N: cancel direct_debit_mandate
				N-->>C: Event direct_debit_mandate:canceled
			end
		end

Payment is returned by the debtor’s bank

sequenceDiagram
		participant C as Customer
    participant N as Mambu Payments
    participant S as Bacs
    autonumber

		C->>N: POST /payment_orders<br>direct_debit_mandate_id = xxx
		N->>N: Create direct debit payment orders
		N-->>C: Event payment_order:approved
		N->>S: Send DDI file
		N-->>C: Event payment_order:sent
		S->>N: Receive Input Report
		N->>N: Process Input Report
			
			note over S: On day 3
			S->>N: Receive ARUDD message

			loop iterate over ARUDD messages
				N->>N: Identify related payment order
				N-->>C: Event payment_order.returned
				N-->>C: Event return:created
				alt Rejection code is final (closed account, etc.)
					N->>N: cancel direct_debit_mandate
					N-->>C: Event direct_debit_mandate:canceled
				end
			end