Create Invoice

A resource you use to accept payments via Lightning Network. It generates a Lightning Invoice in BOLT11 (a standard used for payment requests in the Lightning Network). Lightning wallets such as Breeze or Blink can pay the invoice by scanning it.

Invoice States 1.0
  • An invoice has a default 2-min expiry upon creation.

  • The API will return a paymentRequest field which contains the BOLT11 payment request.

  • It also returns a paymentRequestDataUrl field which you can use to render the paymentRequest as a QR code.

POST https://example.com/v1/invoices

Headers

Name
Type
Description

X-Pouch-Api-Key*

string

X-Pouch-Signature*

string

Request Body

Name
Type
Description

amount*

integer

min value: 1

currency*

string

enums: SAT

description*

string

min length: 1 max length: 128

referenceId*

string

format: uuid

walletId*

string

format: uuid

{
  "data": {
    "id": "9a05c7ec-c366-4766-9a4f-ebd02a1f66c7",
    "walletId": "61ccc621-2811-43c6-b47e-b1f3428850e0",
    "referenceId": "3e5a0eff-51fd-4400-84bc-94d23f3aa53c",
    "currency": "SAT",
    "type": "lightning-invoice",
    "status": "created",
    "description": "test",
    "internalReferenceId": null,
    "paymentRequest": "lntb10u1pjkq9s3pp5ugtgs8rnernwx7efzsepvuqrt8yj693k43js7fs67he5kfw6y99qdq8w3jhxaqcqzpgxqzrcsp5ljkpvxzs93llgerzra2ryzs6a0p0nrzfcfnam9q0hm4lmzx3n6gq9qyyssqud6ls4v3thkt9jm636hedlkmg9q8frxlrmpvxht0tmt2y4xd6ay30fcpuzql57twc2h6tjfyn5tma44n4ud5xspd8fgqfelf7s24p9qp7y5tva",
    "transactionHash": null,
    "amount": 1000,
    "fees": [
      {
        "type": "processingFee",
        "amount": 8
      }
    ],
    "total": 992,
    "remarks": null,
    "createdAt": "2023-11-24T03:18:41.221Z",
    "updatedAt": "2023-11-24T03:18:41.221Z",
    "paymentRequestDataUri": "data:image/png;base64,iVBORw0K....AElFTkSuQmCC"
  }
}

Last updated