Setting Up Your First x402 Service
Learn how to create and deploy an x402-protected service using PayAI facilitator.
Steps
- 1Configure your Express server with PayAI middleware
- 2Define protected routes with pricing
- 3Set up merchant wallet and CDP API keys
- 4Test payment flow end-to-end
Integrating PayAI Services
Sync and use services from PayAI facilitator in your application.
Steps
- 1Call the PayAI sync endpoint
- 2Query services from database
- 3Handle payment quotes and verification
- 4Display services in marketplace UI
Building a Payment Flow
Implement a complete payment flow with wallet integration and verification.
Steps
- 1Connect user wallet to Base network
- 2Request payment quote from server
- 3Approve and sign transaction
- 4Verify payment via PayAI facilitator
- 5Grant access to paid resource
Creating Marketplace Listings
Add your services to the r1x marketplace for discovery.
Steps
- 1Ensure service is synced from PayAI
- 2Verify service metadata is complete
- 3Set appropriate pricing
- 4Test marketplace discovery