Skip to main content

Create one-off invoice

Route

POST
/api/v1/invoices

Usage

LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request POST "$LAGO_URL/api/v1/invoices" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"invoice": {
"external_customer_id": "12345",
"currency": "EUR",
"fees": [
{
"add_on_code": "code1",
"units": 2.5,
"unit_amount_cents": 1200,
"description": "This is description"
}
]
}
}'

Arguments

{
"invoice": {
"external_customer_id": "_ID_",
"currency": "EUR",
"fees": [
{
"add_on_code": "code1",
"units": 2.5,
"unit_amount_cents": 1200,
"description": "placeholder",
}
]
}
}
AttributesTypeDescription
external_customer_idString      RequiredExternal customer ID
currencyString      OptionalInvoice currency

Fees

AttributesTypeDescription
add_on_codeString      RequiredAdd on code
descriptionString      OptionalInvoice fee description
unitsFloat      OptionalFee quantity
unit_amount_centsInteger      OptionalUnit amount cents

Responses

The invoice has been successfully created.

Returns an invoice object.