Gateway Overview
How the Dunmore transparent payment proxy works.
The Dunmore Gateway is a Cloudflare Workers proxy that sits between your clients and your API. It enforces x402 payment requirements and forwards paid requests to your upstream API.
How It Works
The gateway runs on Cloudflare's edge network for sub-50ms latency worldwide. When a request arrives:
- Gateway resolves the endpoint config (KV cache with API fallback)
- If no payment header → return 402 with payment requirements
- If payment header present → verify payment via the facilitator
- Forward the request to your upstream API
- Settle the payment asynchronously via
waitUntil()
Gateway URLs
Your gateway URL follows the pattern:
https://gateway.dunmore.xyz/{project-slug}/{endpoint-path}
For example, if your project slug is my-api and your endpoint path is /weather, clients access:
https://gateway.dunmore.xyz/my-api/weather
No Code Changes Required
Your upstream API doesn't need to know about x402. The gateway handles all payment logic transparently. Your API receives normal HTTP requests after payment verification.