Skip to content

Create a duplicate-guarded Stripe Checkout Session for a subscription

POST
/v1/subscriptions/checkout
curl --request POST \
--url https://api.extport.dev/api/v1/subscriptions/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "extensionId": "example", "planId": "example", "tier": "example", "interval": "month", "priceId": "example", "externalUserId": "example", "email": "hello@example.com", "successUrl": "example", "cancelUrl": "example" }'

Resolves the active recurring plan and Stripe Price by planId or (extensionId, tier, interval) using the connected Stripe account. Checks if the user already has an entitled subscription for this extension and returns a one-click Extport Buyer Portal link instead of creating a duplicate. Defaults successUrl to the Extport checkout confirmation page when omitted.

Media typeapplication/json
object
extensionId
required
string
>= 1 characters <= 64 characters
planId
string
>= 1 characters <= 128 characters
tier
string
>= 1 characters <= 32 characters
interval
string
Allowed values: month year monthly yearly
priceId
string
>= 1 characters <= 128 characters
externalUserId
string
<= 255 characters
email
string format: email
<= 255 characters
successUrl
string
cancelUrl
string

Checkout URL or Extport Buyer Portal redirect (already_subscribed)

Invalid input, disabled/missing plan/price, or Stripe not connected

Extension not found

Stripe API unavailable