You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PaywallMiddleware: ASGI middleware that puts a Paywall in front of chosen paths of any ASGI app (Starlette, FastAPI…). Unpaid requests get the 402. Paid ones reach the app, with PAYMENT-RESPONSE added to its answer.
railpay.fastapi.require_payment(paywall): a FastAPI dependency that returns the Charge, with PaymentRequiredError and payment_required_handler for an exact x402 402 body. Install it with the [fastapi] extra.
Examples: examples/agent.py (pays https://dapp.railpay.app/x402/time) and examples/fastapi_seller.py.
scripts/smoke.py: a read-only check against the live RailPay API and Robinhood Chain. It spends nothing.
README: seller integrations, examples and the full API.