Repayment
How repayment collection works
Once a loan is active, PayMongo collects repayments through one automated and two manual repayment mechanisms:
Sales repayment (daily sweep). At each settlement cycle, PayMongo calculates a repayment from the merchant's settled transactions:
- Sum the merchant's settled amount for the cycle across all payment methods (card, QR Ph, e-wallet, online banking, etc.). Only settled proceeds count — in-flight authorisations and pending clearing do not.
- Compute the collection: repayment_amount = daily_settled × repayment_rate (capped at outstanding balance).
- Create a
pendingrepayment and start a wallet transfer to the lender. - Once the transfer completes, apply the collected amount against the outstanding balance in priority order: principal first, then interest, then DST (Documentary Stamp Tax). Each is tracked separately as
outstanding_principal_amount,outstanding_interest_amount, andoutstanding_dst_amounton the loan object. The repayment moves tosuccess. - When all three outstanding amounts reach zero, the loan transitions to
repaid.
If the wallet transfer fails, the repayment moves to failed and the outstanding balance is unchanged. Failed repayments are not retried automatically, and later sweeps do not collect the same sales again. PayMongo operations retry the failed repayment, capped at the amount still owed on the loan.
Manual repayment. Merchants can initiate a repayment via Dashboard → Capital → Active loan → Make a payment. This creates a checkout session; on payment completion, the loan balance is reduced.
Direct lender repayment. Lenders can record a direct off-platform payment received from the merchant then record the payment on PayMongo:
curl https://api.paymongo.com/v1/capitals/lenders/repayments -H "Content-Type: application/json" -d \
'{
"loan_id": "loan_01HX...",
"amount": 5000000,
"currency": "PHP",
"reference_id": "BankRef-20260420-001"
}'reference_id must be unique per loan. Submitting the same reference_id for the same loan a second time returns 422 with "a repayment with this reference already exists for the loan". Use the receiving bank's transaction reference or a unique identifier from your own system for each payment.
Key property: repayments are capped at the outstanding balance. The final collection is almost always smaller than daily_settled × repayment_rate.
Repayment statuses
| Status | Meaning |
|---|---|
pending | The wallet transfer is in flight (sales or instant-settlement repayment), or the checkout session has not been paid yet (manual repayment). The outstanding balance is not yet reduced. |
success | The transfer or payment completed and the outstanding balance has been reduced by the repayment amount. Direct lender repayments are recorded as success immediately. |
failed | The wallet transfer did not complete. Nothing was collected and the outstanding balance is unchanged. |
You can filter by status on GET /v1/capitals/repayments (merchant) and GET /v1/capitals/lenders/repayments (lender). Accepted values are pending, success, and failed:
GET /v1/capitals/lenders/repayments?status=failedOverpayments
PayMongo caps every repayment at the exact outstanding balance. Any amount received above the outstanding balance is not applied to the loan; the excess is returned to the merchant's PayMongo wallet via a wallet transfer.
Applied amount = min(payment_received, outstanding_balance)
Overpayment = payment_received − applied_amount
Overpayments can occur when:
- A merchant sends a rounded amount that slightly exceeds what is due
- A manual payment and a daily sweep are processed in the same cycle
- Timing differences cause a payment to post before the balance is fully updated
An overpayment starts as pending while the return transfer is in flight. It moves to resolved once the transfer reaches the merchant's wallet. If the transfer fails, it moves to failed. Failed overpayment returns are not retried automatically; PayMongo operations retry them, and a retry moves the overpayment back to pending.
Example — term loan fully paid with small excess
Outstanding balance PHP 10,000.00
Payment received PHP 10,003.25
Applied amount PHP 10,000.00
Overpayment PHP 3.25
New outstanding balance PHP 0.00
Return transfer (pending) PHP 3.25 → resolved on success
The loan is marked repaid and the PHP 3.25 excess is returned to the merchant's PayMongo wallet once the return transfer completes.
Days with no sales
If the merchant has zero settled transactions on a given day, no automated repayment occurs. No event is fired. The loan simply takes longer to close. This is the core risk-sharing property of revenue-based financing: slow days cost the merchant nothing extra.
Prepayment and payoff
A merchant can pay off the remaining balance at any time with no prepayment penalty. Merchants initiate a manual repayment from Dashboard → Capital → Active loan → Make a payment. PayMongo creates a checkout session; on payment completion, the outstanding balance is reduced. When all outstanding amounts reach zero, the loan transitions to repaid.
Updated 14 days ago
