Net::API::Stripe::Billing::Plan - A Stripe Plan Object
0.1
Plans define the base price, currency, and billing cycle for subscriptions. For example, you might have a ¥5/month plan that provides limited access to your products, and a ¥15/month plan that allows full access.
Creates a new Net::API::Stripe objects. It may also take an hash like arguments, that also are method of the same name.
Net::API::Stripe
Toggles verbose mode on/off
Toggles debug mode on/off
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
Whether the plan is currently available for new subscriptions.
Specifies 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 picking the last usage record reported within a period, last_ever for picking the last usage record ever (across period bounds) or max which picks the usage record with the maximum reported usage during a period. Defaults to sum.
The amount in JPY to be charged on the interval specified.
Same as amount, but contains a decimal value with at most 12 decimal places.
Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates 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 usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
For fixed_count installment plans, this is the number of installment payments your customer will make to their credit card.
Not part of the official api documentation, but found in sub object data like in here https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-installments
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
Appears only when the plan has been deleted.
One of day, week, month or year. The frequency with which a subscription should be billed.
The number of intervals (specified in the interval property) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
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.
This is an undocumented property, which appears in data returned by Stripe. This contains the name of the plan.
A brief description of the plan, hidden from customers.
The product whose pricing this plan determines. When expanded, this is a Net::API::Stripe::Product object.
Net::API::Stripe::Product
This is an undocumented property, which appears in data returned by Stripe. This contains a description of the plan.
Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
This is an array of Net::API::Stripe::Billing::Plan::Tiers objects.
Net::API::Stripe::Billing::Plan::Tiers
Defines 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 successively change as the quantity grows.
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with tiers.
This is a Net::API::Stripe::Billing::Plan::TransformUsage object.
Net::API::Stripe::Billing::Plan::TransformUsage
Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.
Type of installment plan, one of fixed_count.
Configures how the quantity per period should be determined, can be either metered or licensed. licensed will automatically bill the quantity set for a plan when adding it to a subscription, metered will aggregate the total usage based on usage records. Defaults to licensed.
{ "id": "expert-monthly-jpy", "object": "plan", "active": true, "aggregate_usage": null, "amount": 8000, "amount_decimal": "8000", "billing_scheme": "per_unit", "created": 1507273129, "currency": "jpy", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_BWtaL30HYleHZU", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }
As you can see, there are extra properties: name, statement_description and statement_descriptior
{ "id": "professional-monthly-jpy", "object": "plan", "active": true, "aggregate_usage": null, "amount": 8000, "amount_decimal": "8000", "billing_scheme": "per_unit", "created": 1541833564, "currency": "jpy", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "name": "MyShop, Inc monthly membership", "nickname": null, "product": "prod_BWtaL30HYleHZU", "statement_description": null, "statement_descriptor": null, "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }
Initial version
Each plan object is now linked to a product object with type=service. The plan object fields statement_descriptor and name attributes have been moved to product objects. Creating a plan now requires passing a product attribute to POST /v1/plans. This may be either an existing product ID or a dictionary of product fields, so that you may continue to create plans without separately creating products.
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/plans, https://stripe.com/docs/billing/subscriptions/products-and-plans
Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Net::API::Stripe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::Stripe
CPAN shell
perl -MCPAN -e shell install Net::API::Stripe
For more information on module installation, please visit the detailed CPAN module installation guide.