Repository navigation
Conversation
GET /api/invoices/{id}/payment-request restates the stored ZIP-321 URI with
integer zatoshis and decoded memos, marks the invoice output required and the
platform fee output optional, and reports payable=false with a reason for
draft, expired, paid, underpaid, in-progress and cross-chain invoices, where
a direct transfer could be refused by the scanner. Lookup is by invoice ID
only; no shipping, refund address or checkout token is exposed.
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
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.
Adds
GET /api/invoices/{id}/payment-requestso agents and wallets can pay a checkout without scraping it.required: trueand uses the storedprice_zatoshis; the URI amount must be within 1 zatoshi, and the address and memo must match. The optionalFEE-<id>platform fee output isrequired: false, because the scanner bills the merchant when it's missing.payable/not_payable_reason: only fresh, untouchedpendinginvoices are payable. It refuses draft, expired, underpaid, already paid, refunded, cancelled and in-progress invoices, and invoices with a cross-chain attempt (accepts_paymentcan reject a direct transfer for those).no-storeand CORS*.Companion PRs: web checkout discovery link, and Zipher's
pay_invoiceMCP tool.Tests:
cargo test --locked: 148 passed, 3 ignored. The new tests cover URI parsing, exact decimal amounts, refused shapes, every not-payable reason, and the handler against an in-memory SQLite database. No live invoice or payment was used.🤖 Generated with Claude Code