Generate Order Invoice

POST

/v1/orders/:id/generate-invoice

Generates a new invoice for the given order with given attributes.


Attributes

name Required

The full name of the customer.

address Required

The street address of the customer.

city Required

The city of the customer.

state Required for US and CA

The state of the customer.

zip_code Required

The ZIP code of the customer.

country Required

The country of the customer.

notes

Any additional notes to include on the invoice.

locale

ISO 639 language code, e.g., ‘en’ for English language.


curl -X "POST" "https://api.lemonsqueezy.com/v1/orders/1/generate-invoice?name=John%20Doe&address=123%20Main%20St&city=Anytown&state=CA&zip_code=12345&country=US&notes=Thank%20you%20for%20your%20business" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a link to download the generated invoice.

{
  "jsonapi": {
    "version": "1.0"
  },
  "meta": {
    "urls": {
      "download_invoice": "https://app.lemonsqueezy.com/my-orders/c1e4de31-b4cf-4668-a6fe-019d071d41ab/invoice/download?address=123%20Main%20St&city=Anytown&country=US&name=John%20Doe&notes=Thank%20you%20for%20your%20business&state=CA&zip_code=12345&signature=c21a17a13d9deeacc99ff52144a06b49df141af37dd668cc70a76bcc8022888e"
    }
  }
}

Was this page helpful?