Skip to main content
Add subscription billing to your SaaS with just a few API calls. This guide covers the REST API — for framework-specific guides, see Next.js Integration.

Overview

Kelviq handles your subscription billing with these endpoints:

Step 1: Create Customer (Optional)

You have two options for creating customers:

Option 1: Auto-create during checkout

Skip this step. Pass email or customerId in the checkout request — Kelviq will auto-create the customer.

Option 2: Create customer explicitly

Create a customer record when a user signs up.
Pre-creating customers is useful when you want to track users in the dashboard before they subscribe.

Step 2: Create Checkout Session

When a user wants to subscribe, create a checkout session and redirect them.

Request

Response

Redirect user to checkoutUrl → They complete payment → Redirected back to your successUrl

Required Parameters

Optional Parameters


Step 3: Get Subscription Details

Check if a customer has an active subscription.

Request

Response

Kelviq handles failed card payment retries and emails the customer a link to pay. Your application does not need its own retry process or payment recovery screen. See Failed subscription payments.

Step 4: Update Subscription

Allow users to upgrade or downgrade their plan.

Request

Response

Required Parameters

Optional Parameters

Activation after payment

Use activate_on_payment when a plan change should not affect access until Kelviq has collected payment.
Do not grant the new plan’s entitlements just because the update request returned successfully. Confirm that the updated subscription is active, or read the customer’s current entitlements.

Step 5: Check Entitlements

Check what features a customer has access to based on their subscription.

Request

Use your Client API Key for this endpoint, not your Server API Key.

Response

Entitlement Types


Complete Flow


Need Help?

Have questions or need implementation support?