Build terms#
const terms = api.loans.terms({
lender: 'me', borrower: 'eren', amount: 10000,
due: C.plusMonths(Date.now(), 1), installments: 2
});
// Propose with lender approval, then accept with borrower approval.Fund and repay#
fundingPayment prepares a stable funding instruction after both approvals. fund executes it. repaymentPayment registers a bounded repayment instruction; repay applies its finalized receipt. The current service is named PrivateObligationService.
Proposed HTTP contracts#
| Rule | Validation |
|---|---|
| Parties | Mutual relationship and both credit permissions. |
| Funding | Same approved terms and finalized receipt. |
| Repayment | Positive amount no greater than outstanding principal. |
POST /obligations
POST /obligations/{id}/accept
POST /obligations/{id}/repay
# Design examples only. No HTTP handlers are shipped.