curl --location 'https://api.opensylo.com/webhooks/outbound/loan.nearly_complete' \
--header 'X-OpenSylo-Signature: sha256=f1e2d3c4b5a6f7e8d9c0b1a2f3e4d5c6b7a8f9e0d1c2b3a4f5e6d7c8b9a0f1e2' \
--header 'X-OpenSylo-Timestamp: 1712495400' \
--header 'X-OpenSylo-Event-Id: evt_oa_20260407_001' \
--header 'Content-Type: application/json' \
--data '{
"event": "loan.nearly_complete",
"event_id": "evt_onc_20260407_004",
"timestamp": "2026-04-07T16:00:00.000Z",
"loan": {
"id": "loan_f1e2d3c4-b5a6-7890-1234-567890abcdef",
"reference": "OSL-2026-00142",
"status": "repaying"
},
"merchant": {
"opensylo_id": "mch_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"marketplace_id": "PLT_MERCH_001"
},
"repayment_status": {
"total_due": 1725000,
"total_repaid": 1690000,
"outstanding": 35000,
"percentage_complete": 97.97
},
"recommendation": {
"cap_next_deduction": true,
"max_deduction_amount": 35000,
"message": "Loan is nearly complete. Cap next deduction to NGN 35,000 to avoid over-collection."
}
}'