---
title: "Generate a new invoice"
method: POST
path: "/v2/invoices"
tags: ["Invoice"]
---

# Generate a new invoice

`POST /v2/invoices`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/v2/invoices`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth`
- TypeScript: <https://skmtc.dev/getalby/apis/lndhub-go/docs/v2/invoices/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns a new bolt11 invoice

## Request body

- V2controllersAddInvoiceRequestBody
  - `amount` integer
  - `description` string
  - `description_hash` string

## Response `200`

OK

- V2controllersAddInvoiceResponseBody
  - `expires_at` string
  - `payment_hash` string
  - `payment_request` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

## Changes

- **2022-06-20** `222a5feac2e3`: 1 info
  - endpoint added
- **2022-04-28** `9677ed311d4f`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/getalby/apis/lndhub-go/changes/v2/invoices/post.md)

---

[API](https://skmtc.dev/getalby/apis/lndhub-go.md) - [All operations](https://skmtc.dev/getalby/apis/lndhub-go/llms.txt) - [OpenAPI document](https://skmtc.dev/getalby/apis/lndhub-go/revisions/0891f2052750?raw)
