Update a plan's device limit, pricing, or active state
PATCH
/v1/plans/{id}
const url = 'https://api.extport.dev/api/v1/plans/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"active":true,"maxActivations":1,"currency":"example","amount":1,"stripeProductId":"example","stripePriceId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.extport.dev/api/v1/plans/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "active": true, "maxActivations": 1, "currency": "example", "amount": 1, "stripeProductId": "example", "stripePriceId": "example" }'Updates active status, maxActivations, and/or pricing. When amount changes, creates a new Stripe Price on your connected Stripe account and archives the previous one.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “ Responses ”OK
Invalid input or Stripe account not connected
Not found
Stripe API unavailable