feat(examples): add EUR settlement example via fiat-capable facilitator#1984
Closed
petteri74dev wants to merge 1 commit intox402-foundation:mainfrom
Closed
feat(examples): add EUR settlement example via fiat-capable facilitator#1984petteri74dev wants to merge 1 commit intox402-foundation:mainfrom
petteri74dev wants to merge 1 commit intox402-foundation:mainfrom
Conversation
|
@petteri74dev is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
Adds an Express server example showing how to accept x402 payments and receive EUR via SEPA Instant. Identical to the standard Express example — the only difference is the FACILITATOR_URL env var pointing to a facilitator that handles USDC-to-EUR conversion. - Two paid endpoints: /weather (0.001 USDC) and /market-data (0.01 USDC) - Follows existing Express example structure and conventions - No new SDK packages or types required
09c136b to
90b67c6
Compare
Collaborator
|
Thanks for the contribution but this doesn’t add anything beyond the standard express example beyond an env var. Examples should also remain neutral and not highlight a specific project, thats what the ecosystem page is for |
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
Adds an Express server example showing how to accept x402 payments and receive EUR via SEPA Instant. The server code is identical to the standard Express example — the only difference is the
FACILITATOR_URLpointing to a facilitator that handles USDC-to-EUR conversion.What this enables
exactscheme, no new packages or types neededChanges
examples/typescript/servers/eur-settlement//weather,/market-data).env-localwithFACILITATOR_URLtemplateNo changes to existing examples, packages, or types.
Design notes
FACILITATOR_URLis an environment variable, not hardcoded — any fiat-capable facilitator worksTest plan
pnpm installresolves without errorspnpm devstarts the server on port 4021GET /weatherreturns 402 Payment RequiredGET /market-datareturns 402 Payment Requiredexpress/example conventions