Repository navigation
Offer payer_data discovery and quantity pricing - #18
Open
shocknet-justin wants to merge 5 commits into
Open
shocknet-justin wants to merge 5 commits into
shocknet-justin wants to merge 5 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
shocknet-justin
marked this pull request as ready for review
September 14, 2026 15:11
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavior
quantityis a positive safe-integer JSON number. Other payer-data values remain strings. Required quantity is never inferred as 1; unsolicited quantity cannot change pricing or fulfillment data.Pricing
Resolve the unit price using the existing category before multiplication: fixed configuration (0), host-resolved current price (1), or payer-selected spontaneous
amount_sats(2). Variable offers do not need an encoded satoshi price, and payeramount_satscannot override the host-resolved price. Apply limits to the final invoice total; unsafe or out-of-range totals use code 5. Preserve accepted quantity for seller fulfillment.Alignment
SDK support is included in shocknet/ClinkSDK#32.
Pub implementation is on https://github.com/shocknet/Lightning.Pub/tree/offer-payer-data-quantity, branched from
dash2. Pub currently exposes fixed and spontaneous pricing; this change does not add a new variable-pricing engine.Pub keeps its existing SDK dependency until 1.8 is released; bump it on
dash2beforedash2merges for release.Manage Fields
Label, price_sats, and payer_data are required in offer.fields. callback_url is optional: omission on create means null; omission on update preserves it; null or an empty string clears it. Updates require offer.id. No label is generated for a missing label.
SDK: shocknet/ClinkSDK#37
Pub: shocknet/Lightning.Pub#1077