Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/lago-credit-notes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Lago API documentation Add_ons Credit Notes API
description: Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
version: 1.15.0
license:
name: AGPLv3
identifier: AGPLv3
contact:
email: tech@getlago.com
servers:
- url: https://api.getlago.com/api/v1
description: US Lago cluster
- url: https://api.eu.getlago.com/api/v1
description: EU Lagos cluster
security:
- bearerAuth: []
tags:
- name: Credit_notes
description: Everything about Credit notes collection
externalDocs:
description: Find out more
url: https://doc.getlago.com/docs/api/credit_notes/credit-note-object
paths:
/credit_notes:
post:
tags:
- Credit_notes
summary: Lago Create a credit note
description: This endpoint creates a new credit note.
operationId: createCreditNote
requestBody:
description: Credit note payload
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNoteCreateInput'
required: true
responses:
'200':
description: Credit note created
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNote'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/UnprocessableEntity'
get:
tags:
- Credit_notes
summary: Lago List all credit notes
description: This endpoint list all existing credit notes.
operationId: findAllCreditNotes
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/external_customer_id'
responses:
'200':
description: Credit notes
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNotes'
'401':
$ref: '#/components/responses/Unauthorized'
/credit_notes/{lago_id}:
parameters:
- name: lago_id
in: path
description: The credit note unique identifier, created by Lago.
required: true
schema:
type: string
example: '12345'
put:
tags:
- Credit_notes
summary: Lago Update a credit note
description: This endpoint updates an existing credit note.
operationId: updateCreditNote
requestBody:
description: Credit note update payload
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNoteUpdateInput'
required: true
responses:
'200':
description: Credit note updated
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNote'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
get:
tags:
- Credit_notes
summary: Lago Retrieve a credit note
description: This endpoint retrieves an existing credit note.
operationId: findCreditNote
responses:
'200':
description: Credit note
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNote'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/credit_notes/{lago_id}/download:
post:
tags:
- Credit_notes
summary: Lago Download a credit note PDF
description: This endpoint downloads the PDF of an existing credit note.
parameters:
- name: lago_id
in: path
description: The credit note unique identifier, created by Lago.
required: true
schema:
type: string
format: uuid
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
operationId: downloadCreditNote
responses:
'200':
description: Credit note PDF
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNote'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/credit_notes/estimate:
post:
tags:
- Credit_notes
summary: Lago Estimate amounts for a new credit note
description: This endpoint allows you to retrieve amounts for a new credit note creation.
requestBody:
description: Credit note estimate payload
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNoteEstimateInput'
operationId: estimateCreditNote
responses:
'200':
description: Credit note amounts
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNoteEstimated'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/UnprocessableEntity'
/credit_notes/{lago_id}/void:
put:
tags:
- Credit_notes
summary: Lago Void available credit
description: This endpoint voids the available credit linked to a specific credit note.
parameters:
- name: lago_id
in: path
description: The credit note unique identifier, created by Lago.
required: true
schema:
type: string
format: uuid
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
operationId: voidCreditNote
responses:
'200':
description: Credit note voided
content:
application/json:
schema:
$ref: '#/components/schemas/CreditNote'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'405':
$ref: '#/components/responses/NotAllowed'
components:
parameters:
per_page:
name: per_page
in: query
description: Number of records per page.
required: false
explode: true
schema:
type: integer
example: 20
external_customer_id:
name: external_customer_id
in: query
description: Unique identifier assigned to the customer in your application.
required: false
explode: true
schema:
type: string
example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
page:
name: page
in: query
description: Page number.
required: false
explode: true
schema:
type: integer
example: 1
schemas:
CreditNoteEstimateInput:
type: object
required:
- credit_note
properties:
credit_note:
type: object
required:
- invoice_id
- items
properties:
invoice_id:
type: string
format: uuid
description: The invoice unique identifier, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
items:
type: array
items:
type: object
required:
- fee_id
- amount_cents
properties:
fee_id:
type: string
format: uuid
description: The fee unique identifier, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
amount_cents:
type: integer
description: The amount of the credit note item, expressed in cents.
example: 10
description: The list of credit note's items.
example:
- fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90
amount_cents: 10
- fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a91
amount_cents: 5
CreditNoteEstimated:
type: object
required:
- estimated_credit_note
properties:
estimated_credit_note:
type: object
required:
- lago_invoice_id
- invoice_number
- currency
- taxes_amount_cents
- sub_total_excluding_taxes_amount_cents
- max_creditable_amount_cents
- max_refundable_amount_cents
- coupons_adjustment_amount_cents
- taxes_rate
- items
properties:
lago_invoice_id:
type: string
format: uuid
description: Unique identifier assigned to the invoice that the credit note belongs to
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
invoice_number:
type: string
description: The invoice unique number, related to the credit note.
example: LAG-1234
currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: The currency of the credit note.
example: EUR
taxes_amount_cents:
type: integer
description: The tax amount of the credit note, expressed in cents.
example: 20
taxes_rate:
type: number
description: The tax rate associated with this specific credit note.
example: 20
sub_total_excluding_taxes_amount_cents:
type: integer
description: The subtotal of the credit note excluding any applicable taxes, expressed in cents.
example: 100
max_creditable_amount_cents:
type: integer
description: The credited amount of the credit note, expressed in cents.
example: 100
max_refundable_amount_cents:
type: integer
description: The refunded amount of the credit note, expressed in cents.
example: 0
coupons_adjustment_amount_cents:
type: integer
description: The pro-rated amount of the coupons applied to the source invoice.
example: 20
items:
type: array
items:
type: object
required:
- amount_cents
- lago_fee_id
properties:
amount_cents:
type: integer
description: The credit note's item amount, expressed in cents.
example: 100
lago_fee_id:
type: string
format: uuid
nullable: true
description: 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.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
description: Array of credit note's items.
applied_taxes:
type: array
items:
type: object
properties:
lago_tax_id:
type: string
format: uuid
description: Unique identifier of the tax, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
tax_name:
type: string
description: Name of the tax.
example: TVA
tax_code:
type: string
description: Unique code used to identify the tax associated with the API request.
example: french_standard_vat
tax_rate:
type: number
description: The percentage rate of the tax
example: 20
tax_description:
type: string
description: Internal description of the taxe
example: French standard VAT
base_amount_cents:
type: integer
example: 100
amount_cents:
type: integer
description: Amount of the tax
example: 2000
amount_currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: Currency of the tax
example: USD
ApiErrorBadRequest:
type: object
required:
- status
- error
properties:
status:
type: integer
format: int32
example: 400
error:
type: string
example: Bad request
ApiErrorNotFound:
type: object
required:
- status
- error
- code
properties:
status:
type: integer
format: int32
example: 404
error:
type: string
example: Not Found
code:
type: string
example: object_not_found
CreditNoteItemObject:
type: object
required:
- lago_id
- amount_cents
- amount_currency
- fee
properties:
lago_id:
type: string
format: uuid
description: The credit note's item unique identifier, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
amount_cents:
type: integer
description: The credit note's item amount, expressed in cents.
example: 100
amount_currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: The credit note's item currency.
example: EUR
fee:
allOf:
- $ref: '#/components/schemas/FeeObject'
- description: The fee object related to the credit note item.
ApiErrorUnprocessableEntity:
type: object
required:
- status
- error
- code
- error_details
properties:
status:
type: integer
format: int32
example: 422
error:
type: string
example: Unprocessable entity
code:
type: string
example: validation_errors
error_details:
type: object
BaseAppliedTax:
type: object
properties:
lago_id:
type: string
format: uuid
description: Unique identifier of the applied tax, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_tax_id:
type: string
format: uuid
description: Unique identifier of the tax, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
tax_name:
type: string
description: Name of the tax.
example: TVA
tax_code:
type: string
description: Unique code used to identify the tax associated with the API request.
example: french_standard_vat
tax_rate:
type: number
description: The percentage rate of the tax
example: 20
tax_description:
type: string
description: Internal description of the taxe
example: French standard VAT
amount_cents:
type: integer
description: Amount of the tax
example: 2000
amount_currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: Currency of the tax
example: USD
created_at:
type: string
format: date-time
description: 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.
example: '2022-09-14T16:35:31Z'
CreditNoteUpdateInput:
type: object
required:
- credit_note
properties:
credit_note:
type: object
required:
- refund_status
properties:
refund_status:
type: string
enum:
- pending
- succeeded
- failed
description: '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.'
example: succeeded
Currency:
type: string
example: USD
enum:
- 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
CreditNotes:
type: object
required:
- credit_notes
properties:
credit_notes:
type: array
items:
$ref: '#/components/schemas/CreditNoteObject'
ApiErrorUnauthorized:
type: object
required:
- status
- error
properties:
status:
type: integer
format: int32
example: 401
error:
type: string
example: Unauthorized
CreditNoteAppliedTaxObject:
allOf:
- $ref: '#/components/schemas/BaseAppliedTax'
type: object
properties:
lago_credit_note_id:
type: string
format: uuid
description: Unique identifier of the credit note, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
base_amount_cents:
type: integer
example: 100
FeeAppliedTaxObject:
allOf:
- $ref: '#/components/schemas/BaseAppliedTax'
type: object
properties:
lago_fee_id:
type: string
format: uuid
description: Unique identifier of the fee, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
CreditNoteCreateInput:
type: object
required:
- credit_note
properties:
credit_note:
type: object
required:
- invoice_id
- items
properties:
invoice_id:
type: string
format: uuid
description: The invoice unique identifier, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
reason:
type: string
enum:
- duplicated_charge
- product_unsatisfactory
- order_change
- order_cancellation
- fraudulent_charge
- other
nullable: true
description: 'The reason of the credit note creation.
Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.'
example: duplicated_charge
description:
type: string
description: The description of the credit note.
example: description
credit_amount_cents:
type: integer
nullable: true
description: The total amount to be credited on the customer balance.
example: 10
refund_amount_cents:
type: integer
nullable: true
description: The total amount to be refunded to the customer.
example: 5
items:
type: array
items:
type: object
required:
- fee_id
- amount_cents
properties:
fee_id:
type: string
format: uuid
description: The fee unique identifier, created by Lago.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
amount_cents:
type: integer
description: The amount of the credit note item, expressed in cents.
example: 10
description: The list of credit note's items.
example:
- fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90
amount_cents: 10
- fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a91
amount_cents: 5
ApiErrorNotAllowed:
type: object
required:
- status
- error
- code
properties:
status:
type: integer
format: int32
example: 405
error:
type: string
example: Method Not Allowed
code:
type: string
example: not_allowed
FeeObject:
type: object
required:
- item
- amount_cents
- amount_currency
- taxes_amount_cents
- taxes_rate
- total_amount_cents
- total_amount_currency
- pay_in_advance
- invoiceable
- units
- precise_unit_amount
- payment_status
properties:
lago_id:
type: string
format: uuid
nullable: true
description: 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.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_charge_id:
type: string
format: uuid
nullable: true
description: Unique identifier assigned to the charge that the fee belongs to
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_charge_filter_id:
type: string
format: uuid
nullable: true
description: Unique identifier assigned to the charge filter that the fee belongs to
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_invoice_id:
type: string
format: uuid
nullable: true
description: Unique identifier assigned to the invoice that the fee belongs to
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_true_up_fee_id:
type: string
format: uuid
nullable: true
description: 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.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_true_up_parent_fee_id:
type: string
format: uuid
nullable: true
description: 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.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_subscription_id:
type: string
format: uuid
nullable: true
description: Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
lago_customer_id:
type: string
format: uuid
nullable: true
description: Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
external_customer_id:
type: string
nullable: true
description: Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
example: external_id
external_subscription_id:
type: string
nullable: true
description: Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
example: external_id
invoice_display_name:
type: string
description: 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.
example: Setup Fee (SF1)
amount_cents:
type: integer
description: The cost of this specific fee, excluding any applicable taxes.
example: 100
precise_amount:
type: string
description: The cost of this specific fee, excluding any applicable taxes, with precision.
example: '1.0001'
precise_total_amount:
type: string
description: The cost of this specific fee, including any applicable taxes, with precision.
example: '1.0212'
amount_currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
example: EUR
taxes_amount_cents:
type: integer
description: The cost of the tax associated with this specific fee.
example: 20
taxes_precise_amount:
type: string
description: The cost of the tax associated with this specific fee, with precision.
example: '0.20123'
taxes_rate:
type: number
description: The tax rate associated with this specific fee.
example: 20
units:
type: string
description: 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.
example: '0.32'
precise_unit_amount:
type: string
description: The unit amount of the fee per unit, with precision.
example: '312.5'
total_amount_cents:
type: integer
description: The cost of this specific fee, including any applicable taxes.
example: 120
total_amount_currency:
allOf:
- $ref: '#/components/schemas/Currency'
- description: The currency of this specific fee, including any applicable taxes.
example: EUR
events_count:
type: integer
description: 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.
example: 23
pay_in_advance:
type: boolean
description: 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).
example: true
invoiceable:
type: boolean
description: 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.
example: true
from_date:
type: string
format: date-time
nullable: true
description: 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.
example: '2022-04-29T08:59:51Z'
to_date:
type: string
format: date-time
nullable: true
description: 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.
example: '2022-05-29T08:59:51Z'
payment_status:
type: string
enum:
- pending
- succeeded
- failed
- refunded
description: 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`.
example: pending
created_at:
type: string
format: date-time
nullable: true
description: The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
example: '2022-08-24T14:58:59Z'
succeeded_at:
type: string
format: date-time
nullable: true
description: The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
example: '2022-08-24T14:58:59Z'
failed_at:
type: string
format: date-time
nullable: true
description: The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
example: '2022-08-24T14:58:59Z'
refunded_at:
type: string
format: date-time
nullable: true
description: The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
example: '2022-08-24T14:58:59Z'
event_transaction_id:
type: string
nullable: true
description: Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is
# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lago/refs/heads/main/openapi/lago-credit-notes-api-openapi.yml