curl --request POST \
--url https://api.getlago.com/api/v1/credit_notes/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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
}
]
}
}
'{
"estimated_credit_note": {
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"invoice_number": "LAG-1234",
"currency": "EUR",
"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,
"max_refundable_amount_cents": 0,
"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"
}
]
}
}This endpoint allows you to retrieve amounts for a new credit note creation.
curl --request POST \
--url https://api.getlago.com/api/v1/credit_notes/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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
}
]
}
}
'{
"estimated_credit_note": {
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"invoice_number": "LAG-1234",
"currency": "EUR",
"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,
"max_refundable_amount_cents": 0,
"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"
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Credit note estimate payload
Show child attributes
The invoice unique identifier, created by Lago.
"1a901a90-1a90-1a90-1a90-1a901a901a90"
The list of credit note's items.
[
{
"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount_cents": 10
},
{
"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a91",
"amount_cents": 5
}
]Credit note amounts
Show child attributes
Unique identifier assigned to the invoice that the credit note belongs to
"1a901a90-1a90-1a90-1a90-1a901a901a90"
The invoice unique number, related to the credit note.
"LAG-1234"
The currency of the credit note.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW "EUR"
The tax amount of the credit note, expressed in cents.
20
The precise tax amount of the credit note, expressed in cents with decimal precision.
20.1
The tax rate associated with this specific credit note.
20
The subtotal of the credit note excluding any applicable taxes, expressed in cents.
100
The credited amount of the credit note, expressed in cents.
100
The refunded amount of the credit note, expressed in cents.
0
The pro-rated amount of the coupons applied to the source invoice.
20
The precise pro-rated amount with decimal precision of the coupons applied to the source invoice.
20.1
Array of credit note's items.
Show child attributes
The credit note's item amount, expressed in cents.
100
Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Show child attributes
Unique identifier of the tax, created by Lago.
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Name of the tax.
"TVA"
Unique code used to identify the tax associated with the API request.
"french_standard_vat"
The percentage rate of the tax
20
Internal description of the taxe
"French standard VAT"
100
Amount of the tax
2000
Currency of the tax
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW "USD"
Was this page helpful?