Hercle
REST
GET/api/v1/invoices

Get Lightning Invoices

Returns all previously created invoices.

Auth:Bearer <api_key>
Tags:LightningInvoices

Request

cURL
curl -G https://publicapi.sandbox.hercle.financial/api/v1/invoices \
  -H "Authorization: Bearer eyJhb..." \
  

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesapplication/json

Response

Success Response Schema

FieldTypeDescription
invoicesarrayList of Lightning invoices
invoices[].idstringUnique identifier for the invoice
invoices[].userIdstringUser ID associated with the invoice
invoices[].emailstringEmail address associated with the invoice
invoices[].encodedPaymentRequeststringEncoded Lightning payment request
invoices[].expiresAtstringISO 8601 timestamp when the invoice expires
invoices[].statusstringInvoice status
invoices[].createdAtstring | nullISO 8601 timestamp of invoice creation
invoices[].updatedAtstring | nullISO 8601 timestamp of last update
invoices[].memostringMemo or description for the invoice
invoices[].paymentHashstringPayment hash
invoices[].paymentPreimagestringPayment preimage
invoices[].nodeIdstringLightning node ID
invoices[].invoiceTypestringType of invoice
invoices[].expirySecsnumber | nullInvoice expiry time in seconds
invoices[].metadatastringAdditional invoice metadata
invoices[].umaPostTransactionDatastringUMA post-transaction data
invoices[].bitcoinNetworkstringBitcoin network (mainnet/testnet)
invoices[].amountOriginalValuenumber | nullOriginal invoice amount value
invoices[].amountOriginalUnitstringOriginal invoice amount unit (e.g., BTC, satoshi)
invoices[].amountPreferredCurrencyUnitstringPreferred currency unit (e.g., USD, EUR)
invoices[].amountPreferredCurrencyValueRoundednumber | nullPreferred currency value (rounded)
invoices[].amountPreferredCurrencyValueApproxnumber | nullPreferred currency value (approximate)
invoices[].domainEventsarrayDomain events associated with the invoice

Responses

Successfully retrieved invoices

200 application/json
{
  "invoices": [
    {
      "id": "inv_abc123def456",
      "userId": "user_789xyz",
      "email": "user@example.com",
      "encodedPaymentRequest": "lnbc10u1p3xnhl2pp5jmxtqn235tkjzf...",
      "expiresAt": "2024-03-28T17:03:12.456Z",
      "status": "OPEN",
      "createdAt": "2024-03-28T16:03:12.456Z",
      "updatedAt": null,
      "memo": "Payment for services",
      "paymentHash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
      "paymentPreimage": "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3",
      "nodeId": "02a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
      "invoiceType": "STANDARD",
      "expirySecs": 3600,
      "metadata": "{}",
      "umaPostTransactionData": "",
      "bitcoinNetwork": "mainnet",
      "amountOriginalValue": 1000,
      "amountOriginalUnit": "satoshi",
      "amountPreferredCurrencyUnit": "USD",
      "amountPreferredCurrencyValueRounded": 1,
      "amountPreferredCurrencyValueApprox": 0.65,
      "domainEvents": []
    }
  ]
}

API Tester

Test this endpoint directly against the sandbox environment

Get your API key from Hercle Sandbox

https://publicapi.sandbox.hercle.financial/api/v1/invoices