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

Setup your Tracking & Billing

Introduction#

In this tutorial, you’ll learn how to:
1.
Configure Checkpoints (the Events of activity that capture your agents Actions and Outcomes).
2.
Set up pricing based on Checkpoints.
3.
Integrate Stykite’s API so your agents can send signals in real time.
4.
Create a Subscription or Plan to tie everything together and trigger automatic invoicing for a customer.
By the end of this guide, you’ll have a functioning billing workflow that collects signals from your agents and automatically invoices your customers based on usage.
Before you begin, check that you have:
A Stykite account: Sign up and get access to the Stykite dashboard.
2.
API Credentials: You’ll need an API key available in the "Settings" section.
Let’s get started!

Step 1: Create Checkpoits#

Goto "Checkpoints"
Click on Add Checkpoints
Add as many Checkpoints that represents your AI Agent's work.
Define Checkpoint Type
Action
Outcome

Step 2: Create a Meter#

A Meter is the ledger that captures your customers consumption of your product. Such as Credits, Tokens etc.
Also known as Pay-as-you-Go.
Also known as Usage-based billing.
Add a Meter.

Step 3: Create a Plan#

Stykite offers flexible ways to bill your customer:
1.
Free - in case your product has a Freemium.
2.
Fixed Price - A fixed price that user pays every cycle (monthly, yearly or quarterly). Available formats:
1.
Flat Price
2.
Volume
3.
Tiered
4.
Staircase
3.
Checkpoints based Pricing
You can Attach a Meter with a Plan and then configure Usage or Deduction of the Credit based on Checkpoints Events.
Action or Outcome Based - Select the Action of Outcome Checkpoint from the dropdown. Enter Meter value to be debited when the event occurs.
Note - You can combine unlimited number of Checkpoints in a single Plan.

Step 4 Integrate Stykite’s API#

To record Checkpoints in real time, integrate your AI application with Stykite’s API:
Send Checkpoints: Whenever your Agent performs an action (e.g., chatbot receives a message), make a request to Stykite’s endpoint. Typical payload format includes:
--data-raw '{
"checkpoint_name": "session-ended",
"customer_identifier": "onkar@stykite.com",
"provider": "OPENAI",
"model": "GPT_4",
"input_token": 100,
"output_token": 200,
"session_id": "1234",
"extra_params": {
"key1": "value1"
}
}
Verify Response: Stykite will respond with a status code indicating success or failure.

Step 5 - Test vs Live Mode#

Stykite supports both Test & Lives modes separately. Make sure you update your code structure/keys for both modes accordingly.

Step 6 Testing Your Billing Workflow#

Before going live, confirm that your workflow is functioning as expected:
Generate Test Checkpoints: Use Test mode to trigger a few Checkpoints.
Check Dashboard: Verify the Checkpoints are showing correctly for the respective Customer.
Review Invoices: Head to the Invoices section (Draft) to see if the invoice reflects your pricing model.
Modified at 2025-08-22 09:44:44
Previous
Pre-requisites: Account & API Keys
Next
Integrate Subscription Plans & Payments
Built with