# RevFence > RevFence is a subscription-retention service for SaaS companies that bill through Stripe. When a customer presses "cancel", your server makes one HTTP call to RevFence, redirects the customer to a short-lived RevFence page that shows a retention offer (discount, free period, pause, downgrade or invoice credit), and RevFence applies an accepted offer directly on the subscription in your connected Stripe account. A declined offer sends the customer back to your own cancellation flow. RevFence never cancels a subscription and needs no webhooks or client-side script. Integration is a single server-side request: `POST https://api.revfence.com/public/sessions` with `Authorization: Bearer `, an `Idempotency-Key` header and `{ customerId, subscriptionId, customerEmail?, returnUrl? }`. The `201` response carries a `url`; redirect the customer there. On any error, continue your own cancellation flow. ## Documentation - [Complete integration guide](https://www.revfence.com/llms-full.txt): the exact flow, prerequisites, endpoint reference with every error code, idempotency and return-URL rules, copy-paste examples (TypeScript, Express, Next.js, Ruby, PHP, Python, curl), testing, go-live checklist, security notes and FAQ. - [Panel](https://app.revfence.com): create a project, connect Stripe, define offers, set the cancel URL and allowed return origins, generate API keys, open quota-free test sessions. - [Developer page](https://www.revfence.com/en/developers): the human-readable install page (CLI commands, guarantees, request shape). - [API base](https://api.revfence.com): `POST /public/sessions` opens a session; `GET /public/integration` (same Bearer API key) reports project status, Stripe connection, active offers, quota, allowed return origins and key mode for verification. Both are rate limited to 60 requests per minute per key. ## CLI - `npx revfence init`: detects your framework (Next.js, Express, Fastify, Koa, Hono, NestJS, Rails, Laravel, Django, Flask, FastAPI or a generic helper), shows the diff, writes the server-side session call and stores `REVFENCE_API_KEY` in your git-ignored `.env.local`/`.env`. - `npx revfence doctor`: calls `GET /public/integration` with your key and reports project status, Stripe connection, active offers, quota, allowed return origins and key mode, plus what is still missing before go-live. - `npx revfence skill`: copies the Claude Code skill and the Cursor rule for RevFence into your repository so an AI coding assistant integrates it correctly. ## Product - [Features](https://www.revfence.com/en/features) - [Pricing](https://www.revfence.com/en/pricing) - [FAQ](https://www.revfence.com/en/faq)