- Documentation
- API References
- Integrations
- Blog
- FAQ
- GitHub
- Getting started
Add-ons
Analytics
Billable metrics
Coupons
Credit notes
Customer usage
Customers
Events
Fees
Invoices
Organizations
Plans
Resources
Subscriptions
Taxes
Wallets
Webhook endpoints
Webhooks
API Reference
Download a credit note PDF
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The credit note unique identifier, created by Lago.
LAGO_URL="https://api.getlago.com"
CREDIT_NOTE_ID="__CREDIT_NOTE_ID__"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/credit_notes/$CREDIT_NOTE_ID/download" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json'
{
"credit_note": {
"applied_taxes": [],
"balance_amount_cents": 100,
"coupons_adjustment_amount_cents": 20,
"created_at": "2022-09-14T16:35:31Z",
"credit_amount_cents": 100,
"credit_status": "available",
"currency": "EUR",
"description": "Free text",
"file_url": "https://getlago.com/credit_note/file",
"invoice_number": "LAG-1234",
"issuing_date": "2022-12-06",
"items": [],
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"number": "LAG-1234-CN2",
"reason": "other",
"refund_amount_cents": 123,
"refund_status": "pending",
"sequential_id": 2,
"sub_total_excluding_taxes_amount_cents": 100,
"taxes_amount_cents": 20,
"taxes_rate": 20,
"total_amount_cents": 120,
"updated_at": "2022-09-14T16:35:31Z"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The credit note unique identifier, created by Lago.
Response
Amount of the tax
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
, 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
The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
Unique identifier of the applied tax, created by Lago.
Unique identifier of the tax, created by Lago.
Unique code used to identify the tax associated with the API request.
Internal description of the taxe
Name of the tax.
The percentage rate of the tax
Unique identifier of the credit note, created by Lago.
The remaining credit note amount, expressed in cents.
The pro-rated amount of the coupons applied to the source invoice.
The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
The credited amount of the credit note, expressed in cents.
The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
available
: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.consumed
: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.voided
: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
available
, consumed
, voided
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
, 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
The description of the credit note.
The PDF file of the credit note.
The invoice unique number, related to the credit note.
The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
Array of credit note’s items.
The credit note’s item amount, expressed in cents.
The credit note’s item currency.
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
, 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
The fee object related to the credit note item.
The cost of this specific fee, excluding any applicable taxes.
The currency of this specific fee. It indicates the monetary unit in which the fee’s cost is expressed.
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
, 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
List of fee applied taxes
Amount of the tax
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
, 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
The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
Unique identifier of the applied tax, created by Lago.
Unique identifier of the tax, created by Lago.
Unique code used to identify the tax associated with the API request.
Internal description of the taxe
Name of the tax.
The percentage rate of the tax
Unique identifier of the fee, created by Lago.
The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is charge
and the payment for the fee is made in advance (pay_in_advance
is set to true
).
The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
The beginning date of the period that the fee covers. It is applicable only to subscription
and charge
fees. This field indicates the start date of the billing period or subscription period associated with the fee.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where true
represents that the fee was included on the invoice, and false
indicates that the fee was not included on the invoice.
Item attached to the fee
The code of the fee item. It can be the code of the add-o
n, the code of the charge
, the code of the credit
or the code of the subscription
.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
The type of the fee item. Possible values are AddOn
, BillableMetric
, WalletTransaction
or Subscription
.
AddOn
, BillableMetric
, Subscription
, WalletTransaction
Unique identifier of the fee item, created by Lago. It can be the identifier of the add-on
, the identifier of the charge
, the identifier of the credit
or the identifier of the subscription
.
The name of the fee item. It can be the name of the add-on
, the name of the charge
, the name of the credit
or the name of the subscription
.
The fee type. Possible values are add-on
, charge
, credit
or subscription
.
charge
, add_on
, subscription
, credit
Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
Unique identifier assigned to the group that the fee belongs to
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.
Unique identifier assigned to the invoice that the fee belongs to
Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount.
Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee.
Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where true
represents that the fee was paid in advance (straightaway), and false
indicates that the fee was not paid in arrears (at the end of the period).
Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are pending
, succeeded
, failed
and refunded
.
pending
, succeeded
, failed
, refunded
The unit amount of the fee per unit, with precision.
The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
The cost of the tax associated with this specific fee.
The tax rate associated with this specific fee.
The ending date of the period that the fee covers. It is applicable only to subscription
and charge
fees. This field indicates the end date of the billing period or subscription period associated with the fee.
The cost of this specific fee, including any applicable taxes.
The currency of this specific fee, including any applicable taxes.
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
, 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
The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
The credit note’s item unique identifier, created by Lago.
The credit note unique identifier, created by Lago.
Unique identifier assigned to the invoice that the credit note belongs to
The credit note unique number.
The reason of the credit note creation.
Possible values are duplicated_charge
, product_unsatisfactory
, order_change
, order_cancellation
, fraudulent_charge
or other
.
duplicated_charge
, product_unsatisfactory
, order_change
, order_cancellation
, fraudulent_charge
, other
The refunded amount of the credit note, expressed in cents.
The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
pending
: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.succeeded
: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.failed
: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
pending
, succeeded
, failed
The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
The subtotal of the credit note excluding any applicable taxes, expressed in cents.
The tax amount of the credit note, expressed in cents.
The tax rate associated with this specific credit note.
The total amount of the credit note, expressed in cents.
The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
Was this page helpful?
LAGO_URL="https://api.getlago.com"
CREDIT_NOTE_ID="__CREDIT_NOTE_ID__"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/credit_notes/$CREDIT_NOTE_ID/download" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json'
{
"credit_note": {
"applied_taxes": [],
"balance_amount_cents": 100,
"coupons_adjustment_amount_cents": 20,
"created_at": "2022-09-14T16:35:31Z",
"credit_amount_cents": 100,
"credit_status": "available",
"currency": "EUR",
"description": "Free text",
"file_url": "https://getlago.com/credit_note/file",
"invoice_number": "LAG-1234",
"issuing_date": "2022-12-06",
"items": [],
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"number": "LAG-1234-CN2",
"reason": "other",
"refund_amount_cents": 123,
"refund_status": "pending",
"sequential_id": 2,
"sub_total_excluding_taxes_amount_cents": 100,
"taxes_amount_cents": 20,
"taxes_rate": 20,
"total_amount_cents": 120,
"updated_at": "2022-09-14T16:35:31Z"
}
}