Gateway Setup
Register your API and get a payment-gated proxy URL.
Set up your API behind the Dunmore payment gateway.
Create a Project
First, create a project in the console or via the API:
curl -X POST https://api.dunmore.xyz/api/projects \
-H "Authorization: Bearer gf_live_..." \
-d '{ "name": "My API", "walletAddress": "0x..." }'
Register Endpoints
Add each route you want to monetize:
curl -X POST https://api.dunmore.xyz/api/projects/proj_abc/endpoints \
-H "Authorization: Bearer gf_live_..." \
-d '{
"path": "/weather",
"upstreamUrl": "https://api.example.com/weather",
"priceUsd": "0.01"
}'
Test the Gateway
Your endpoint is immediately accessible via the gateway:
curl https://gateway.dunmore.xyz/my-api/weather
# → 402 Payment Required with x402 payment terms
Next Steps
- Payment Flow — Understand the full payment lifecycle
- Webhooks — Get notified on payments