Skip to content
TurnitPass
DevelopersAPI v1Get an API key
Browse documentation

DevelopersBilling

Connect billing to plan limits

Checkout, customer portal routing, webhook storage, and plan-aware word limits stay in sync with your subscription, so upgrades and usage always line up.

REST API v1

Your platform

Overview

workspace
POST/api/billing/checkout
account scoped
checkout request
POST /api/billing/checkout
fetch('/api/billing/checkout', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ plan: 'pro', cycle: 'monthly' })
})

Review board

01

Checkout

Plan selection posts to the checkout route and limits update with the subscription.

02

Portal

Signed-in users can be routed to Stripe customer portal after a subscription exists.

03

Webhooks

Billing events are stored so subscription state can be reconciled with the workspace.

Billing loop

What happens after a user upgrades

1

Choose a plan

The pricing page determines plan, cycle, word allocation, API access, and checkout copy.

2

Open checkout

The billing route creates a Stripe Checkout session when live credentials are configured.

3

Receive webhook

Stripe sends subscription events that can update account plan and word balance.

4

Manage portal

Subscribed users return to Stripe portal for card, invoice, cancellation, or plan-management flows.

Configuration

Settings the owner confirms before launch

Checkout key
required for checkoutServer-side billing credential for checkout and portal sessions.
Webhook signing key
required for webhooksUsed to verify billing events before updating account state.
Plans
Monthly and annualBoth billing cycles are supported on the same account and workspace.
Site URL
canonical URLUsed for checkout return URLs, sitemap, and production links.
Implementation note. Stripe and Google credentials intentionally remain external configuration. The frontend should communicate the billing flow without hardcoding private secrets.
Next, make it part of your workflow.Continue reading