credit_notes
Estimate amounts for a new credit note
This endpoint allows you to retrieve amounts for a new credit note creation.
post/credit_notes/estimate
Request body
Example request
{
"credit_note": {
"invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"items": [
{
"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount_cents": 10
},
{
"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a91",
"amount_cents": 5
}
]
}
}Response
Credit note amounts
Example response
{
"estimated_credit_note": {
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"invoice_number": "LAG-1234",
"currency": "USD",
"taxes_amount_cents": 20,
"precise_taxes_amount_cents": 20.1,
"taxes_rate": 20,
"sub_total_excluding_taxes_amount_cents": 100,
"max_creditable_amount_cents": 100,
"coupons_adjustment_amount_cents": 20,
"precise_coupons_adjustment_amount_cents": 20.1,
"items": [
{
"amount_cents": 100,
"lago_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
],
"applied_taxes": [
{
"lago_tax_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"tax_name": "TVA",
"tax_code": "french_standard_vat",
"tax_rate": 20,
"tax_description": "French standard VAT",
"base_amount_cents": 100,
"amount_cents": 2000,
"amount_currency": "USD"
}
]
}
}