Skip to content

feat(examples): add EUR settlement example via fiat-capable facilitator#1984

Closed
petteri74dev wants to merge 1 commit intox402-foundation:mainfrom
petteri74dev:feat/eur-settlement-example
Closed

feat(examples): add EUR settlement example via fiat-capable facilitator#1984
petteri74dev wants to merge 1 commit intox402-foundation:mainfrom
petteri74dev:feat/eur-settlement-example

Conversation

@petteri74dev
Copy link
Copy Markdown

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_URL pointing to a facilitator that handles USDC-to-EUR conversion.

What this enables

  • European sellers receive EUR in their bank account instead of USDC
  • Buyers/agents pay USDC as normal — no change to client code
  • Standard exact scheme, no new packages or types needed
  • One env var change from an existing x402 integration

Changes

  • New example: examples/typescript/servers/eur-settlement/
  • Express server with two paid endpoints (/weather, /market-data)
  • README explaining the facilitator swap pattern
  • .env-local with FACILITATOR_URL template

No changes to existing examples, packages, or types.

Design notes

  • FACILITATOR_URL is an environment variable, not hardcoded — any fiat-capable facilitator works
  • In this example, AsterPay is used as one possible EUR settlement facilitator. Other facilitators can implement the same capability by supporting the same HTTP interface.

Test plan

  • pnpm install resolves without errors
  • pnpm dev starts the server on port 4021
  • GET /weather returns 402 Payment Required
  • GET /market-data returns 402 Payment Required
  • Config files match express/ example conventions
  • Payment flow works with x402 client SDK

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

@petteri74dev is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the examples Changes to examples label Apr 10, 2026
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
@petteri74dev petteri74dev force-pushed the feat/eur-settlement-example branch from 09c136b to 90b67c6 Compare April 10, 2026 12:39
@phdargen
Copy link
Copy Markdown
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

@phdargen phdargen closed this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Changes to examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants