---
title: "Create a lightning invoice"
method: POST
path: "/api/v2/wallet/{walletId}/lightning/invoice"
tags: ["Lightning"]
---

# Create a lightning invoice

`POST /api/v2/wallet/{walletId}/lightning/invoice`

This API call is used to create a new lightning invoice which can be
used for requesting and receiving payments over the lightning network.

## Path parameters

- `walletId` string, required

## Request body

- object
  - `valueMsat` string, number — The value of the invoice in millisatoshis. Provide exactly one of `valueMsat` or `valueSat`. This field is not supported for Go wallets.
  - `valueSat` number — The value of the invoice in satoshis. Provide exactly one of `valueMsat` or `valueSat`.
  - `memo` string — Optional memo or description for the invoice
  - `expiry` number — Optional expiry time in seconds. By default, the invoice will expire in 72 hours. This field is not supported for Go wallets - it is automatically set to the default.

## Response `200`

OK

- LightningInvoice
  - `memo` string — A memo or description for the invoice
  - `amtPaidMsat` string, number — The number of millisats actually paid to this invoice, this may be greater than the amount requested by the invoice, since lightning allows overpaying (but not underpaying) invoices.
  - `invoice` string, required — The BOLT \#11 encoded invoice
  - `paymentHash` string, required — The payment hash of the invoice
  - `valueMsat` string, number, required — The value of the invoice in millisatoshis
  - `expiresAt` string, date-time, required — ISO-8601 string representing when the invoice will expire
  - `status` 'open' | 'settled' | 'canceled', required — The status of the invoice
  - `walletId` string, required
  - `createdAt` string, date-time, required — ISO-8601 string representing when the invoice was created
  - `updatedAt` string, date-time, required — ISO-8601 string representing when the invoice was updated

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/bitgo/apis/bitgo-api.md) · [All operations](https://skmtc.net/bitgo/apis/bitgo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitgo/bitgo-api/revisions/e445c15e5bee/schema)
