Trial Offers v1
Trial offers let you define free or paid introductory pricing for a subscription item. A TrialOffer specifies the price to charge during the trial, how many billing intervals the trial lasts, and what price the subscription item transitions to when the trial ends. You attach a TrialOffer to a subscription item using items[current_ when creating or updating a subscription.
Attributes
- idstring
Unique identifier for the object.
- activeboolean
Whether the trial offer is active. Set to false to archive the trial offer.
- durationobject
The duration of the trial offer.
- end_
behavior objectThe behavior of the trial offer when it ends.
- nicknamenullable string
A brief description of the trial offer, hidden from customers.
The maximum length is 255 characters.
- pricestringExpandable
The price during the trial offer.
More attributes
- objectstring, value is "product_catalog.trial_offer"
- livemodeboolean
{ "id": "to_1Hh5Xx2eZvKYlo2C8JaUOv4R", "object": "product_catalog.trial_offer", "livemode": false, "active": true, "duration": { "relative": { "iterations": 2 }, "type": "relative" }, "end_behavior": { "transition": { "price": "price_1Hh5Xx2eZvKYlo2C8JaUOv3P" }, "type": "transition" }, "price": "price_1Hh5Xx2eZvKYlo2C8JaUOv2Q"}Creates a trial offer.
Parameters
- durationobjectRequired
Duration of one service period of the trial.
- end_
behavior objectRequiredDefine behavior that occurs at the end of the trial.
- pricestringRequired
Price configuration during the trial period (amount, billing scheme, etc).
- activeboolean
Whether the trial offer can be used for new subscriptions. Defaults to true.
- nicknamestring
A brief description of the trial offer, hidden from customers.
The maximum length is 255 characters.
Returns
Returns a trial offer object if the call succeeded.
curl https://api.stripe.com/v1/product_catalog/trial_offers \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d "duration[relative][iterations]=2" \ -d "end_behavior[transition][price]={{PRICE_ID}}" \ -d price={{PRICE_ID}}{ "id": "to_1Hh5Xx2eZvKYlo2C8JaUOv4R", "object": "product_catalog.trial_offer", "livemode": false, "active": true, "duration": { "relative": { "iterations": 2 }, "type": "relative" }, "end_behavior": { "transition": { "price": "price_1Hh5Xx2eZvKYlo2C8JaUOv3P" }, "type": "transition" }, "price": "price_1Hh5Xx2eZvKYlo2C8JaUOv2Q"}