Testing

Running the offer lifecycle in test mode

Use your sk_test_ key against the standard API endpoints to exercise the full lifecycle:

StepEndpoint
Create a draft offer/v1/capitals/lenders/offers
Invite a test account/v1/capitals/lenders/offers/{offer_id}/accounts
Submit a test application/v1/capitals/applications (using a test account key)
List and review the application/v1/capitals/lenders/applications/{application_id}
Approve the application/v1/capitals/lenders/applications/{application_id}/approve
View the resulting contract and loan/v1/capitals/contracts (using a test account key)
Record a direct lender repayment/v1/capitals/lenders/repayments

Each step moves the objects through their real state machine and validates your integration end-to-end.

Testing repayment collection

To test automated repayment collection in test mode, use simulation api with test mode API key.

curl -XPOST https://api.paymongo.com/v1/capitals/lenders/contracts/{contract_id}/simulate/repayment \
  -H 'Content-Type: application/json' \
  -d '{
  "sales_amount": 500000
}'

To test manual (merchant-initiated) repayment, initiate a manual repayment from Dashboard → Capital → Active loan → Pay early.