Documentation
Everything you need to get started with PayFence.
Quick Start
Get your API monetized in four simple steps.
Create account
Sign up at app.payfence.io and connect your Stripe account to start receiving payments.
Register your API
Add a new site with your origin URL and a unique slug that identifies your API.
Create plans
Define pricing tiers, usage quotas, and billing cycles for your API consumers.
Share gateway URL or install SDK
Distribute your PayFence gateway URL for proxy mode, or integrate our SDK for middleware mode.
SDK Installation
Install the PayFence SDK for Node.js or Python.
Node.js
npm install @payfence/nodePython
pip install payfence-pythonTechnical References
Deep dives into PayFence's security and integration protocols.
Key Concepts
Essential terms to understand PayFence.
Site
Your API registered in PayFence, identified by a unique slug and origin URL.
Plan
A pricing tier with defined quotas, billing cycles, and access permissions.
Token
API key issued to consumers after subscription, used to authenticate requests.
Entitlement
Active subscription granting a consumer access to your API under a specific plan.
Frequently Asked Questions
How long does setup take?+
Most developers complete setup in under 10 minutes. Create an account, register your API, define a plan, and you're live.
Do I need to modify my API code?+
Not with proxy mode — just point consumers to your PayFence URL. With middleware mode, add one line of code to validate tokens.
Where do payments go?+
Directly to your Stripe account via Stripe Connect. PayFence never holds your revenue.