Discounts
If enabled in you Facility, you can request discounts for the Installments through the API using this endpoint:
POST /installments/{uuid}/discounts
{
"amount": 75.0,
"applied_date": "2025-08-11T16:35:00Z", // ISO Format
"reason": "Discouting the late penalty fees" // Specific reason for this discount
}Rules:
- The amount being discounted cannot be less than the "principal" amount of the installment
- If the Loan's outstanding amount - the discounts sum cannot be less than the Loans's outstanding principal.
If you request don't pass in any rule, you'll receive and HTTP Response 400 - Bad Request with the reason.
Otherwise, the discount will be created and a HTTP Response 201 - Created will be returned.
Closing an installment for less than its principal
The normal cap keeps a discount from eating into the installment's principal. If your user account has the can_close_installment_with_discount permission, and installment closing is enabled for the Facility, you can submit an amount that exceeds that cap through the same endpoint — no new endpoint, no different request shape:
POST /installments/{uuid}/discounts
{
"amount": 350.0,
"applied_date": "2025-08-11T16:35:00Z", // ISO Format
"reason": "Negotiated payoff exceeding standard cap" // Specific reason for this discount
}This is meant for cases like a negotiated payoff, a collections write-off, or a goodwill settlement — where the intent is to close the installment out for less than it's actually worth, not just apply a routine discount.
Rules:
- Your account needs the
can_close_installment_with_discountpermission. - The installment's Facility needs installment closing enabled. If it isn't, you'll receive an HTTP Response 400 - Bad Request, even with the permission:
{
"errors": {
"amount": ["Installment closing with discount is not enabled for this facility."]
}
}If your account doesn't have the permission, or the amount is within the normal cap, this endpoint behaves exactly as described above — no change.
How to use it:
- Check the installment's current outstanding amount (via the normal installment fields — no new field or endpoint for this).
- Submit a discount for that amount through the endpoint above, same as any other discount.
- Once the discount brings the installment's balance to zero, it's automatically marked as paid — same pipeline as a normal discount.
Updated 18 days ago