Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions docs/build/apps/x402.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ x402 is an open protocol from the Coinbase Developer Platform that enables progr

On Stellar, x402 works with Soroban authorization so that clients can pay for API requests via signed auth entries, ideal for micropayments and payment enabled apps. To build an x402-enabled service or integrate payments into your app, see [Build Applications](./README.mdx) and the resources below.

## Demo

Try the [x402 Demo](https://stellar.org/x402-demo). Send an x402 payment on Stellar Testnet or Mainnet and see the x402 payment flow in action. ([source code](https://github.com/stellar/x402-stellar))

[![Screenshot of the x402 payment flow demo on Stellar](/assets/guides/x402-demo.png)](https://stellar.org/x402-demo)

## x402 Compatible Wallets

To support x402 on Stellar, a wallet must support [auth-entry signing](../guides/transactions/signing-soroban-invocations.mdx#method-2-auth-entry-signing) (Soroban authorization entry signing). The following wallets support auth-entry signing:
Expand All @@ -28,13 +34,23 @@ Freighter Mobile does not currently support x402; use the Freighter browser exte

:::

## x402 Facilitator
## x402 Facilitators

You can use a facilitator to verify and settle x402 payments. Two options are available for Stellar:

### Coinbase x402 Facilitator

Coinbase’s x402 facilitator supports Stellar on **Testnet** with sponsored fees. Check which networks and options are supported:

- **[x402 Facilitator Supported Networks](https://www.x402.org/facilitator/supported)** — Lists supported networks (including `stellar:testnet`) and facilitator configuration.

### Build on Stellar Relayer (with OpenZeppelin x402 Plugin)

The [OpenZeppelin Relayer x402 Plugin for x402](https://github.com/OpenZeppelin/relayer-plugin-x402-facilitator) implements the x402 Facilitator API so you can serve x402 payments directly from a Relayer instance. The x402 Facilitator leverages the OpenZeppelin Relayer Framework. It works with the [Coinbase x402](https://github.com/coinbase/x402) ecosystem and exposes the expected `/verify`, `/settle`, and `/supported` endpoints under the Relayer plugin router.
The [Relayer Plugin for x402](https://github.com/OpenZeppelin/relayer-plugin-x402-facilitator) implements the x402 Facilitator API so you can serve x402 payments directly from a Relayer instance. The x402 Facilitator leverages the OpenZeppelin Relayer Framework. It works with the [Coinbase x402](https://github.com/coinbase/x402) ecosystem and exposes the expected `/verify`, `/settle`, and `/supported` endpoints under the Relayer plugin router.

### How to Use
#### How to Use

The x402 facilitator Service is now live on Testnet and Mainnet. Under the hood, the plugin leverages OpenZeppelin Channels to submit transactions onchain via a managed Relayer and Facilitator setup.
This x402 facilitator service is available on Testnet and Mainnet. Under the hood, the plugin leverages OpenZeppelin Channels to submit transactions onchain via a managed Relayer and Facilitator setup.

#### Testnet

Expand All @@ -56,10 +72,12 @@ This version supports x402 v2 specification. For x402 v1 support, please use a p

:::

## Resources
## Examples

- **x402 on Stellar (Stellar repo)** — Tools, examples, and references for the x402 protocol on Stellar. Use this as the canonical source for Stellar-specific x402 demos and tooling. [View on GitHub](https://github.com/stellar/x402-stellar)
- **x402 Starter Template** — A starter template for building payment-enabled applications with x402. Simplified scaffolding demonstrating x402 payment protocol integration with browser wallet support; use it as a foundation for micropayment-enabled services, SaaS applications, or any project that needs frictionless web payments. [View on GitHub](https://github.com/ElliotFriend/x402/tree/stellar-browser-wallet-example/examples/typescript/fullstack/browser-wallet-example)
- **Economic Load Balancer** — An intelligent multi-chain payment router that automatically selects the most cost-efficient network for high-frequency AI agent micropayments. [View on GitHub](https://github.com/marcelosalloum/x402/tree/x402-hackathon)
- **1-shot Stellar x402 app** — Example x402 app with a video paywall and guide for building payment-enabled apps on Stellar. [View on GitHub](https://github.com/oceans404/1-shot-stellar/tree/main/x402-app)

## Additional Documentation

Expand All @@ -71,8 +89,10 @@ This version supports x402 v2 specification. For x402 v1 support, please use a p

## Learn more

- [x402 Demo](https://stellar.org/x402-demo) — A demo site for an x402 transaction on Stellar
- [x402 on Stellar (Landing page)](https://stellar.org/x402) — Stellar x402 overview and resources
- [x402 on Stellar (Blog)](https://stellar.org/blog/foundation-news/x402-on-stellar) — Foundation news and announcement
- [x402 protocol (Coinbase Developer Platform)](https://docs.cdp.coinbase.com/x402) — Official x402 protocol overview and spec
- [x402 protocol specification](https://www.x402.org/) — x402 Specification and Whitepaper
- [Coinbase x402 GitHub](https://github.com/coinbase/x402) — Official x402 Protocol GitHub Repo
- [x402-stellar (npm)](https://www.npmjs.com/package/x402-stellar) — npm package for x402 on Stellar
- [Signing Soroban invocations](../guides/transactions/signing-soroban-invocations.mdx) — Auth-entry signing and transaction signing on Stellar
Binary file added static/assets/guides/x402-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading