Repayment by credit

Credit transfer repayment covers inbound payments where the borrower sends funds to a connected account. Two patterns are supported depending on your routing model.

Pattern A - Expected payment (shared account)

🚧

This feature is under development.

Use this pattern when borrowers transfer to a shared connected account. Mambu Payments uses an expected_payment object to match the inbound credit transfer to the correct loan.

  1. Create an expected payment. Call POST /expected_payments with the loan or credit arrangement ID, the expected amount, currency, and matching criteria (e.g. reference, IBAN).
  2. Receive the statement. Your connector forwards the account statement to Mambu Payments.
  3. Reconcile. Mambu Payments matches the transaction to the expected_payment and fires expected_payment.reconciled.
  4. Book in Mambu Core. Mambu Payments books the repayment transaction and fires expected_payment.cbs_transaction_booked.
sequenceDiagram
participant C as Your system
participant M as Mambu Core
participant N as Mambu Payments
participant S as Connector
autonumber
C->>N: Create expected payment <br>attached to loan or credit arrangement
S->>N: Send account statement
N->>N: Reconcile expected payment
N->>M: Book repayment

Pattern B - Dedicated IBAN

Use this pattern when each loan or borrower gets a dedicated internal_account with its own IBAN, or account number. Matching is automatic, meaning any incoming transfer to that IBAN is a repayment for that loan.

  1. Create an internal account. Call POST /internal_accounts with type set to own. This assigns a dedicated IBAN to the loan.
  2. Attach it to the loan. Update repayment_details.receiving_account_id with the internal_account ID.
  3. Receive the incoming payment. Your connector forwards the payment to Mambu Payments. Mambu Payments matches it to the internal account and fires incoming_payment.received.
  4. Book in Mambu Core. Mambu Payments books the repayment and fires incoming_payment.cbs_transaction_booked.
sequenceDiagram
participant C as Your system
participant M as Mambu Core
participant N as Mambu Payments
participant S as Connector
autonumber
C->>N: Create internal account<br>attached to loan or credit arrangement
S->>N: Forward incoming payment
N->>N: Match payment to<br>internal account
N->>M: Book repayment

Webhooks

EventWhen it fires
incoming_payment.receivedCredit transfer matched and received on the internal account.
incoming_payment.cbs_transaction_bookedRepayment transaction booked in Mambu Core.

Both patterns can coexist on the same loan. Use expected payments for one-off repayments and a dedicated virtual IBAN for standing instructions or direct bank transfers.