PayFence Live Demo
Walk through real API monetization flows. Each demo uses live PayFence tokens, real quota tracking, and authentic 402 Payment Required responses.
FakeExpedia
CheckingProxy Mode
Travel booking API protected by PayFence Gateway proxy. All traffic flows through the gateway, which handles auth, quota enforcement, and rate limiting. The origin server rejects direct access.
FakeAmazon
CheckingMiddleware Mode
E-commerce API with PayFence middleware integrated directly. The app validates tokens on each request, enforces quotas, and returns 402 with checkout URLs when quota is exhausted.
Architecture
Browser (You)
|
v
Demo Console (Next.js BFF) <-- This app, server-side
| |
v v
PayFence FakeAmazon API <-- Middleware mode:
Gateway (direct calls) validates tokens in-app
|
v
FakeExpedia API <-- Proxy mode:
(origin-protected) gateway forwards trafficAll API tokens remain server-side. The browser never sees or sends PayFence tokens directly. This is the Backend-For-Frontend (BFF) pattern.
Request authorized, quota deducted, response returned.
Quota exhausted. Response includes checkout URL.
Direct origin access blocked. Must go through gateway.