Delete a plan
Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.
API Endpoint: DELETE /v1/plans/{plan}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.plan.delete(plan="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.plan.delete(plan="string")List all plans
Returns a list of your plans.
API Endpoint: GET /v1/plans
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.plan.list()from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.plan.list()Retrieve a plan
Retrieves the plan with the given ID.
API Endpoint: GET /v1/plans/{plan}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.plan.get(plan="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
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
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.plan.create(currency="string", interval="day")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
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}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.plan.update(plan="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.plan.update(plan="string")