fix: forward x402 v2 extensions in payment payload for Bazaar discovery#197
Open
oceans404 wants to merge 1 commit intoopen-wallet-standard:mainfrom
Open
fix: forward x402 v2 extensions in payment payload for Bazaar discovery#197oceans404 wants to merge 1 commit intoopen-wallet-standard:mainfrom
oceans404 wants to merge 1 commit intoopen-wallet-standard:mainfrom
Conversation
|
@oceans404 is attempting to deploy a commit to the MoonPay Team on Vercel. A member of the Team first needs to authorize it. |
oceans404
added a commit
to oceans404/core
that referenced
this pull request
Apr 8, 2026
Same fix as the PR (open-wallet-standard#197), applied on top of the Stellar support commits on main. Fixes open-wallet-standard#196 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same fix as the PR (open-wallet-standard#197), applied on top of the Stellar support commits on main. Fixes open-wallet-standard#196 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
oceans404
added a commit
to oceans404/core
that referenced
this pull request
Apr 8, 2026
Same fix as the PR (open-wallet-standard#197), applied on top of the Stellar support commits on main. Fixes open-wallet-standard#196 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
287bcfa to
cf272c5
Compare
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.
Summary
Fixes #196
I was building Dermi (a skincare/makeup ingredient checker API) for the OWS hackathon and wanted to get it listed on the x402 Bazaar discovery layer. I had the v2 Bazaar extension configured correctly on the server side, and payments were going through the CDP facilitator successfully — but Dermi never appeared in the Bazaar.
After debugging, I found that OWS parses
acceptsandresourcefrom the 402PAYMENT-REQUIREDheader but drops theextensionsfield. Since the facilitator readsextensions.bazaarfrom the payment payload during settle to catalog services, the discovery metadata was never reaching the facilitator.Once I added
extensionssupport to OWS, Dermi was indexed on both the CDP Bazaar and PayAI Bazaar immediately.Changes
crates/ows-pay/src/types.rsextensions: Option<serde_json::Value>toX402Response(so extensions are parsed from the 402 header)extensions: Option<serde_json::Value>toPaymentPayloadV2(so extensions are included in the payment sent back)crates/ows-pay/src/x402.rsparse_requirementsnow returns extensions as a 4th valuehandle_x402passes extensions through tobuild_signed_paymentbuild_signed_paymentpasses extensions tobuild_evm_exactbuild_evm_exactincludes extensions in thePaymentPayloadV2Test plan
cargo test -p ows-pay)extensionsisOptionwithserde(default), so 402 responses without extensions still work