Skip to main content

Generate upgrade link

POST 

https://api.freemius.com/v1/products/{product_id}/licenses/{license_id}/checkout/link.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.

Generate an upgrade link for a license. The API accepts a variety of parameters with which you can specify new plans or quota or billing cycles. If you skip all those, then a manual renewal link will be generated instead. The link will be valid for 24 hours.

Request

Path Parameters

    product_id integer<int64>required

    The ID of the product.

    Possible values: >= 1

    Example: 1234
    license_id integer<int64>required

    The ID of the License.

    Possible values: >= 1

    Example: 1234

Bodyrequired

    plan_idstring<int64>

    The plan ID to upgrade to.

    Possible values: >= 0

    billing_cyclestring

    The billing cycle or period of a plan.

    Possible values: [monthly, annual, lifetime]

    quota object

    The quota to use. Can be a number or the string 'unlimited'.

    oneOf
    integer

    Possible values: >= 1

    is_payment_method_updateboolean
    Default value: false

    Whether to update the payment method. If true, the link will be generated for the current plan and billing cycle of the license and other parameters will be ignored. If the license is not associated with a subscription, or is lifetime, an exception will be thrown.

Responses

Upgrade link generated successfully.

Schema
urlstring<uri>

The URL to the checkout page.

settings object

The settings used to generate the link. This can be fed as-is to the Freemius Checkout JS SDK if you're using modals in your website.

property name*any

The settings used to generate the link. This can be fed as-is to the Freemius Checkout JS SDK if you're using modals in your website.

Example: {"plugin_id":1,"plan_id":2,"licenses":"unlimited"}
expiresstring<date-time>

The expiration date of the link.

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