Merchant Quickstart
This is the shortest credible production path: protect a route with @dexterai/x402, settle through the public facilitator, and then expand into pricing, discovery, and operations.
The core merchant flow is:
- Protect an endpoint with
@dexterai/x402 - Point settlement at the Dexter facilitator
- Accept x402 requests from compatible clients and OpenDexter-driven flows
- Expand into pricing, access control, and discovery once the basic flow works
Minimal Path
1. Install the SDK
2. Protect an endpoint
The simplest server path is x402Middleware:
That gives you the shortest route to:
- returning
402 Payment Required - delegating settlement to the Dexter facilitator
- accepting payment before your handler runs
3. Verify the network and facilitator assumptions
Before hard-coding network behavior, check:
- Supported Networks
- SKALE if that is your partner target
4. Test the buyer path
The client-side path can be as short as:
For browser clients, use createX402Client.
For React apps, use useX402Payment.
5. Expand from there
After the endpoint works, the next steps are usually:
- dynamic pricing
- access-pass style access models
- discovery and listing strategy
- seller operations and monitoring
Recommended Default Stack
For most merchants, the easiest first production path is:
@dexterai/x402- Dexter facilitator at
https://x402.dexter.cash - Solana or Base as the first network target
- OpenDexter-compatible discovery assumptions
Why This Is The Right Starting Point
The SDK already covers:
- client fetch wrappers
- browser and React flows
- Express middleware
- manual server control
- Access Pass
- dynamic pricing
- token pricing
The facilitator already covers:
/supported/verify/settle- multi-chain settlement across Solana and EVM support surfaces
What Happens After First Success
Add discovery
One of Dexter's strongest merchant advantages is that successful paid traffic can flow into OpenDexter marketplace discovery instead of staying invisible.
Add access models
If per-request payment is too granular for your use case, move next to Access Pass style access.
Add dynamic pricing
If cost varies by prompt, token count, or payload size, move next to dynamic pricing and token pricing.
When To Use The Lower-Level Server API
Use createX402Server() instead of x402Middleware() when you need:
- manual control over the payment flow
- custom route handling around
402responses - more precise quote validation or settlement handling
- an integration that does not fit the one-middleware pattern
Merchant Checklist
Before you call the integration done, verify:
- the route returns a correct
402before payment - the route settles successfully through
https://x402.dexter.cash - the correct
payTowallet receives funds - your chosen network appears in the supported-network story
- your endpoint is ready for discovery and quality evaluation