Delete a plan
Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.
API Endpoint: DELETE /v1/plans/{plan}
import Stripe from "@sideko-inc/stripe";
const client = new Stripe({ token: process.env["API_TOKEN"]!! });
const res = await client.plan.delete({ plan: "string" });List all plans
Returns a list of your plans.
API Endpoint: GET /v1/plans
import Stripe from "@sideko-inc/stripe";
const client = new Stripe({ token: process.env["API_TOKEN"]!! });
const res = await client.plan.list();Retrieve a plan
Retrieves the plan with the given ID.
API Endpoint: GET /v1/plans/{plan}
import Stripe from "@sideko-inc/stripe";
const client = new Stripe({ token: process.env["API_TOKEN"]!! });
const res = await client.plan.get({ plan: "string" });Create a plan
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
API Endpoint: POST /v1/plans
import Stripe from "@sideko-inc/stripe";
const client = new Stripe({ token: process.env["API_TOKEN"]!! });
const res = await client.plan.create({ currency: "string", interval: "day" });Update a plan
Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.
API Endpoint: POST /v1/plans/{plan}
import Stripe from "@sideko-inc/stripe";
const client = new Stripe({ token: process.env["API_TOKEN"]!! });
const res = await client.plan.update({ plan: "string" });