Skip to main content
PUT
/
api
/
v1
/
addons
/
{id}
/
charges
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const setPackagePricingResponse = await client.v1.addons.setPricing('x', { pricingType: 'FREE' });

console.log(setPackagePricingResponse.data);
{
  "data": {
    "id": "<string>",
    "pricingType": "FREE"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

Server API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Body

application/json

Request to set the pricing configuration for a plan or addon.

pricingType
enum<string>
required

The pricing type (FREE, PAID, or CUSTOM)

Available options:
FREE,
PAID,
CUSTOM
pricingModels
PricingModel · object[]

Array of pricing model configurations

Maximum array length: 50
overagePricingModels
OveragePricingModel · object[]

Array of overage pricing model configurations

Maximum array length: 50
overageBillingPeriod
enum<string>

When overage charges are billed

Available options:
ON_SUBSCRIPTION_RENEWAL,
MONTHLY
minimumSpend
MinimumSpend · object[] | null

Minimum spend configuration per billing period

billingId
string

Deprecated: billing integration ID

Maximum string length: 255

Response

The addon pricing result.

Response object

data
SetPackagePricingResponse · object
required

Result of setting package pricing.