Package com.stripe.param
Class PlanCreateParams
java.lang.Object
com.stripe.net.ApiRequestParams
com.stripe.param.PlanCreateParams
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static class
static enum
static class
static class
A label that represents units of this product.static enum
static class
static enum
Nested classes/interfaces inherited from class com.stripe.net.ApiRequestParams
ApiRequestParams.EnumParam
-
Field Summary
Fields inherited from class com.stripe.net.ApiRequestParams
EXTRA_PARAMS_KEY
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlanCreateParams.Builder
builder()
Whether the plan is currently available for new subscriptions.Specifies a usage aggregation strategy for plans ofusage_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 asamount
, 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.getMeter()
The meter tracking the usage of a metered price.A brief description of the plan, hidden from customers.getTiers()
Each element represents a pricing tier.Defines if the tiering price should begraduated
orvolume
based.Apply a transformation to the reported usage or set quantity before computing the billed price.Default number of trial days when subscribing a customer to this plan usingtrial_from_plan=true
.Configures how the quantity per period should be determined.Methods inherited from class com.stripe.net.ApiRequestParams
paramsToMap, toMap
-
Method Details
-
builder
-
getActive
Whether the plan is currently available for new subscriptions. Defaults totrue
. -
getAggregateUsage
Specifies a usage aggregation strategy for plans ofusage_type=metered
. Allowed values aresum
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) ormax
which uses the usage record with the maximum reported usage during a period. Defaults tosum
. -
getAmount
A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. -
getAmountDecimal
Same asamount
, but accepts a decimal value with at most 12 decimal places. Only one ofamount
andamount_decimal
can be set. -
getBillingScheme
Describes how to compute the price per period. Eitherper_unit
ortiered
.per_unit
indicates that the fixed amount (specified inamount
) will be charged per unit inquantity
(for plans withusage_type=licensed
), or per unit of total usage (for plans withusage_type=metered
).tiered
indicates that the unit pricing will be computed using a tiering strategy as defined using thetiers
andtiers_mode
attributes. -
getCurrency
Required. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getExpand
Specifies which fields in the response should be expanded. -
getExtraParams
Map of extra parameters for custom features not available in this client library. The content in this map is not serialized under this field's@SerializedName
value. 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. -
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. -
getInterval
Required. Specifies billing frequency. Eitherday
,week
,month
oryear
. -
getIntervalCount
The number of intervals between subscription billings. For example,interval=month
andinterval_count=3
bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). -
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 tometadata
. -
getMeter
The meter tracking the usage of a metered price. -
getNickname
A brief description of the plan, hidden from customers. -
getProduct
-
getTiers
Each element represents a pricing tier. This parameter requiresbilling_scheme
to be set totiered
. See also the documentation forbilling_scheme
. -
getTiersMode
Defines if the tiering price should begraduated
orvolume
based. Involume
-based tiering, the maximum quantity within a period determines the per unit price, ingraduated
tiering pricing can successively change as the quantity grows. -
getTransformUsage
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined withtiers
. -
getTrialPeriodDays
Default number of trial days when subscribing a customer to this plan usingtrial_from_plan=true
. -
getUsageType
Configures how the quantity per period should be determined. Can be eithermetered
orlicensed
.licensed
automatically bills thequantity
set when adding it to a subscription.metered
aggregates the total usage based on usage records. Defaults tolicensed
.
-