Repayment by direct debit

Mambu Payments retrieves the upcoming installment schedule from Mambu Core and automatically generates outgoing direct debit collections.

Step-by-step

  1. Create a direct debit mandate. Call POST /direct_debit_mandates to register the borrower's direct debit authorisation. The mandate must be active and configured as outgoing.
  2. Attach the mandate to the loan. Update repayment_details.direct_debit_mandate_id on the loan or credit arrangement with the mandate ID.
  3. Daily collection (automated). Every day, Mambu Payments polls Mambu Core for upcoming installments. For each installment due, it creates a payment_order and fires payment_order.auto_approved . The payment is then sent to your connector.
  4. Booking in Mambu Core. Mambu Payments books the repayment transaction on the loan account and fires payment_order.cbs_transaction_booked. You can configure this booking upon payment execution or reconciliation.
  5. Payment return. If your payment is returned, Mambu Payments will automatically adjust the corresponding transaction in Mambu Core.

Sequence diagrams

sequenceDiagram
participant C as You
participant N as Mambu Payments
participant M as Mambu Core
participant S as Connector
N->>M: Retrieve installments due in N days
N->>N: Create payment orders
N-->>C: payment_order.auto_approved
N->>S: Send payment orders
N-->>C: payment_order.sent
Alt Booking at execution
S->>N: Execution notifcation
N-->>C: payment_order.executed
N->>M: Book repayment transaction
N-->>C: payment_order.cbs_transaction_booked
else Booking at reconciliation
S->>N: Execution notifcation
N-->>C: payment_order.executed
S->>N: Forward account statement
N->>N: Reconcile payment orders
N-->>C: payment_order.reconciled
N->>M: Book repayment transaction
N-->>C: payment_order.cbs_transaction_booked
end
alt Payment is returned
S->>N: Forward return
N-->>C: payment_order.returned
N->>M: Adjust repayment transaction
N-->>C: payment_order.cbs_transaction_adjusted
end

Webhooks

EventWhen it fires
payment_order.cbs_transaction_bookedRepayment transaction booked in Mambu Core.
payment_order.cbs_transaction_adjustedRepayment transaction adjusted in Mambu Core