turbot/stripe

steampipe plugin install stripesteampipe plugin install stripe

Table: stripe_plan

Pricing plans defined in the Strip account.

Examples

List all plans

select
*
from
stripe_plan

List all plans with a trial period

select
id,
nickname,
trial_period_days
from
stripe_plan
where
trial_period_days > 0

List all products with their associated plans

select
p.id,
p.name,
pl.id,
pl.nickname
from
stripe_product as p,
stripe_plan as pl
where
p.id = pl.product_id
order by
p.name,
pl.nickname

.inspect stripe_plan

Plans define the base price, currency, and billing cycle for recurring purchases of products.

NameTypeDescription
activebooleanWhether the plan is currently available for purchase.
aggregate_usagetextSpecifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum.
amountbigintThe unit amount in cents to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
amount_decimaldouble precisionThe unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
billing_schemetextDescribes how to compute the price per period. Either per_unit or tiered.
createdtimestamp without time zoneTime at which the plan was created.
currencytextThree-letter ISO currency code, in lowercase. Must be a supported currency.
deletedbooleanTrue if the plan is marked as deleted.
idtextUnique identifier for the plan.
intervaltextThe frequency at which a subscription is billed. One of day, week, month or year.
interval_countbigintThe number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
livemodebooleanHas the value true if the plan exists in live mode or the value false if the plan exists in test mode.
metadatajsonbSet of key-value pairs that you can attach to an plan. This can be useful for storing additional information about the plan in a structured format.
nicknametextA brief description of the plan, hidden from customers.
product_idtextID of the product whose pricing this plan determines.
tiersjsonbEach element represents a pricing tier. This parameter requires billing_scheme to be set to tiered.
tiers_modetextDefines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
transform_usagejsonbApply a transformation to the reported usage or set quantity before computing the amount billed.
trial_period_daysbigintDefault number of trial days when subscribing a customer to this plan using trial_from_plan=true.
usage_typetextConfigures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed.