Skip to main content

Create a checkout token

POST 

https://api.freemius.com/v1/products/{product_id}/users/{user_id}/tokens/checkout.json

Auth:Bearer TokenSCOPE: PRODUCT

Product-scoped API tokens allow you to operate on the product itself. This token usually allows read-only access to the product configuration and write access to several operations on subscriptions, customers, payments, and more. For most SaaS or app integrations, this is the token you will need.

  1. Go to the Freemius Developer Dashboard.
  2. Open the Settings page of the relevant product.
  3. Click the API & Keys tab.
  4. Copy the API Bearer Authorization Token from the UI.

Create a 1 min long token that represents the details of the user for setting the user context in a checkout session. Please read our documentation to learn how to use it.

Request

Path Parameters

    product_id integer<int64>required

    The ID of the product.

    Possible values: >= 1

    Example: 1234
    user_id integer<int64>required

    The ID of the User.

    Possible values: >= 1

    Example: 1234

Responses

The created checkout token.

Schema
token
Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJwcm9kdWN0X2lkIjozLCJ0b2tlbl9leHBpcmF0aW9uIjoxNTY3ODk4NzYwfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
We use essential cookies to enable our site to function. With your consent, we also use analytics and advertising cookies to understand how visitors interact with our site and to improve our services.
Learn More