PayFence Live Demo

Walk through real API monetization flows. Each demo uses live PayFence tokens, real quota tracking, and authentic 402 Payment Required responses.

Server-side calls (BFF pattern)Tokens never exposed to browserReal PayFence API calls

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 traffic

All API tokens remain server-side. The browser never sees or sends PayFence tokens directly. This is the Backend-For-Frontend (BFF) pattern.

200 OK

Request authorized, quota deducted, response returned.

402 Payment Required

Quota exhausted. Response includes checkout URL.

403 Forbidden

Direct origin access blocked. Must go through gateway.