public class PlanCreateParams extends ApiRequestParams
Nested Class SummaryModifier and TypeClassDescription
static classA label that represents units of this product.
Method SummaryModifier and TypeMethodDescription
builder()Whether the plan is currently available for new subscriptions.Specifies a usage aggregation strategy for plans of
usage_type=metered.A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.Same as
amount, but accepts a decimal value with at most 12 decimal places.Describes how to compute the price per period.Required. Three-letter ISO currency code, in lowercase.Specifies which fields in the response should be expanded.Map of extra parameters for custom features not available in this client library.
getId()An identifier randomly generated by Stripe.Required. Specifies billing frequency.The number of intervals between subscription billings.Set of key-value pairs that you can attach to an object.A brief description of the plan, hidden from customers.
getTiers()Each element represents a pricing tier.Defines if the tiering price should be
volumebased.Apply a transformation to the reported usage or set quantity before computing the billed price.Configures how the quantity per period should be determined.
builderpublic static PlanCreateParams.Builder builder()
getActivepublic Boolean getActive()Whether the plan is currently available for new subscriptions. Defaults to
getAggregateUsagepublic PlanCreateParams.AggregateUsage getAggregateUsage()Specifies a usage aggregation strategy for plans of
usage_type=metered. Allowed values are
sumfor summing up all usage during a period,
last_during_periodfor using the last usage record reported within a period,
last_everfor using the last usage record ever (across period bounds) or
maxwhich uses the usage record with the maximum reported usage during a period. Defaults to
getAmountpublic Long getAmount()A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
getAmountDecimalpublic BigDecimal getAmountDecimal()Same as
amount, but accepts a decimal value with at most 12 decimal places. Only one of
amount_decimalcan be set.
getBillingSchemepublic PlanCreateParams.BillingScheme getBillingScheme()Describes how to compute the price per period. Either
per_unitindicates that the fixed amount (specified in
amount) will be charged per unit in
quantity(for plans with
usage_type=licensed), or per unit of total usage (for plans with
tieredindicates that the unit pricing will be computed using a tiering strategy as defined using the
getCurrencypublic String getCurrency()
getExpandSpecifies which fields in the response should be expanded.
getExtraParamsMap of extra parameters for custom features not available in this client library. The content in this map is not serialized under this field's
@SerializedNamevalue. Instead, each key/value pair is serialized as if the key is a root-level field (serialized) name in this param object. Effectively, this map is flattened to its parent instance.
getIdpublic String getId()An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
getIntervalpublic PlanCreateParams.Interval getInterval()Required. Specifies billing frequency. Either
getIntervalCountpublic Long getIntervalCount()The number of intervals between subscription billings. For example,
interval_count=3bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
getMetadatapublic Object getMetadata()Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
getNicknamepublic String getNickname()A brief description of the plan, hidden from customers.
getProductpublic Object getProduct()
getTiersEach element represents a pricing tier. This parameter requires
billing_schemeto be set to
tiered. See also the documentation for
getTiersModepublic PlanCreateParams.TiersMode getTiersMode()Defines if the tiering price should be
volume-based tiering, the maximum quantity within a period determines the per unit price, in
graduatedtiering pricing can successively change as the quantity grows.
getTransformUsagepublic PlanCreateParams.TransformUsage getTransformUsage()Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with
getTrialPeriodDayspublic Long getTrialPeriodDays()
getUsageTypepublic PlanCreateParams.UsageType getUsageType()Configures how the quantity per period should be determined. Can be either
licensedautomatically bills the
quantityset when adding it to a subscription.
meteredaggregates the total usage based on usage records. Defaults to