Skip to content

Create a plan

POST
/v1/plans
curl --request POST \
--url https://api.extport.dev/api/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "extensionId": "example", "tier": "example", "entitlementType": "perpetual", "billingInterval": "one_time", "maxActivations": 1, "currency": "example", "amount": 1, "stripeProductId": "example", "stripePriceId": "example" }'

One plan per (extension, tier, entitlementType, billingInterval) — each plan maps 1:1 to a Stripe Price under the extension Stripe Product. Creates or reuses the Stripe Product and creates the Stripe Price automatically via your connected Stripe account.

Media typeapplication/json
object
extensionId
required
string
>= 1 characters
tier
required
string
>= 1 characters <= 32 characters
entitlementType
string
Allowed values: perpetual recurring
billingInterval
string
Allowed values: one_time month year
maxActivations
integer
>= 1 <= 100
currency
string
/^[a-z]{3}$/
amount
required
integer
>= 50 <= 99999999
stripeProductId
string
>= 1 characters <= 128 characters
stripePriceId
string
>= 1 characters <= 128 characters

Created

Invalid input or Stripe account not connected

Extension not found

Plan already exists for this extension

Stripe API unavailable