Skip to main content

Core Payments API (REST)

The Core Payments API is the REST surface for taking a one-off Lightning payment: create an invoice, send the buyer to a hosted checkout page, and receive a signed webhook when it is paid. It is not a separate plan. Every Lightning Enable account can use it, including the Free Producer Sandbox; see Plans for what each plan adds.

Lightning Enable does not hold funds. Your payment provider (Strike or OpenNode) or your own wallet over Nostr Wallet Connect facilitates custody and settlement.

What you need​

  1. A Lightning Enable merchant API key (sent as X-API-Key).
  2. A payment provider credential saved on your account: Strike (default), NWC, or OpenNode (legacy).

The flow​

curl -X POST https://api.lightningenable.com/api/payments \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"orderId": "ORDER-12345",
"amount": 49.99,
"currency": "USD",
"description": "Premium Widget"
}'
  1. POST /api/payments returns 201 with invoiceId, the BOLT11 lightningInvoice, expiresAt, and payUrl.
  2. Send the buyer to payUrl (the hosted checkout page at /pay/{token}), or render lightningInvoice as a QR code yourself.
  3. Lightning Enable posts a signed webhook to your callback URL when the status changes. GET /api/payments/{invoiceId} is the authoritative status if a webhook is missed.

Currencies​

Strike invoices can be priced in USD, EUR, GBP, or BTC, and OpenNode also accepts fiat-priced charges. The NWC lane prices in BTC only, because a wallet has no exchange rate.

Next steps​