Check whether a published BOLT12 offer is still usable

A shop can keep a BOLT12 offer printed on a sign long after its first sale. Inspect the offer's usage policy and current activity before replacing the sign.

Inspect the original offer ID

Set OFFER_ID to the ID retained when the offer was created. Query the node that created it. A remote node cannot use its local offer inventory to answer for the issuer.

lightning-cli listoffers "$OFFER_ID" | jq '.offers[] | {offer_id, active, used, single_use, label}'

Interpret used and active independently

used records that an associated invoice has been paid. A reusable offer may remain active after that first payment. For a single-use offer, a completed sale changes the operational meaning of the printed code. Check the corresponding invoice records to establish individual orders or amounts.

docs.corelightning.org listoffers · docs.corelightning.org listinvoices