Stykite
  1. Getting Started
Stykite
  • Introduction
    • What is Stykite?
    • Who should use Stykite?
    • When Stykite isn't the right fit?
    • Key Concepts
    • Pre-requisites: Account & API Keys
  • Getting Started
    • Setup your Tracking & Billing
    • Integrate Subscription Plans & Payments
    • Setup Payments
      • Configuring Razorpay Webhooks for Stykite
  • API Reference
    • Customer Facing Widgets
      • Pricing Widget Integration Guide
      • My Account Widget Integration
      • Subscribe Button
    • API Reference
      • Webhooks
        • Customer Subscription Status Update
        • Add-on Purchase Success
      • Usage
        • Send Usage
      • Customer
        • Create Customer with Auto Subscribe
        • Get Customer and Subscription Details
        • Update Customer Meter Entitlements
      • Subscription
        • Create Subscription
        • Cancel Subscription
        • Update Subscription
      • Checkpoint
        • Track Checkpoint Usage API
  • Learning Stykite
    • Subscriptions & Plans
    • Add-ons
    • Pricing Versions
    • Manual Subscriptions & Exclusive Plans
    • Invoices
    • Payments
    • Sales Tax
    • Customers
    • Transactions & Refunds
    • Settings
  1. Getting Started

Integrate Subscription Plans & Payments

This document outlines the steps to integrate Stykite APIs into your application for managing subscriptions, payments, and usage tracking.

Step 1: Generate an API Key#

1.
Go to Stykite Settings.
2.
Click Create API Key.
3.
Provide a label for your key.
4.
Select the scope: API Integration.
5.
Click Generate API Key.
6.
Copy and save the generated key securely.
⚠️ Important: The API key will only be shown once for security purposes.

Step 2: Subscribe User to a Plan#

To subscribe a user to a plan, you’ll use the Payment API.
Full reference: Payment API Docs

Example Request#

Example Response#

{
  "status": true,
  "value": {
    "transaction_tsid": "TRN-0MSC9073DVBTK"
  }
}

Redirect User to Checkout#

Take the transaction_tsid from the response and redirect the user to the checkout URL:
https://checkout.stykite.com/<transaction_tsid>
✅ Example:
https://checkout.stykite.com/TRN-0MSC9073DVBTK

Step 3: Checkpoint Usage Tracking#

Use Stykite’s Checkpoint API to track usage and trigger billing events.
Full reference: Checkpoint Usage API Docs

Example Request#

checkpoint_key: the usage metric to track (e.g., api_calls, messages_sent).
checkpoint_value: the numeric value to record.

Example Response#

{
  "status": true,
  "message": "Checkpoint recorded successfully"
}

✅ Summary#

1.
Generate API Key from Stykite dashboard.
2.
Subscribe user to a plan → get transaction_tsid → redirect to checkout.
3.
Record usage via Checkpoint API to track and bill based on consumption.
4.
Monitor billing and usage directly from Stykite dashboard.
Modified at 2025-08-29 06:55:54
Previous
Setup your Tracking & Billing
Next
Configuring Razorpay Webhooks for Stykite
Built with