Skip to main content

Create a new invoice

POST 

/api/v1/stores/:storeId/invoices

Creates a Bitcoin payment invoice and returns the checkout link, Lightning invoice (BOLT11), and on-chain Bitcoin address.

Typical flow

  1. Your backend calls this endpoint when a customer checks out.
  2. Redirect the customer to checkoutLink (or embed the QR codes from qrCodes).
  3. Coinsnap monitors the payment and sends a webhook event when the invoice is Settled.

Payment methods

  • Lightning — instant, zero confirmation, recommended for most use cases.
  • BTC — on-chain Bitcoin, requires 1 confirmation (~10 min).
  • Both enabled by default if enabledPaymentMethods is omitted.

Tip: Store your order reference in orderId so you can reconcile invoices with your own orders later.

Request

Responses

Successfully created the invoice