Subscription schedules use cases

    Learn how to use subscription schedules.

    The following use cases demonstrate some common ways to use subscription schedules. They’re modeled after a fictional newspaper company called The Pacific. It offers two subscription options: print and digital. The print option is for the physical newspaper and the digital option allows access to the newspaper’s website. Both subscriptions bill monthly.

    Starting a subscription in the future

    By default, new print subscriptions start on the first day of the next month. To accomplish this, the start_date is set to a point in the future. The code below creates a subscription that starts in the future:

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=1590969600 \ -d end_behavior=release \ -d phases[0][plans][0][price]=price_print \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][iterations]=12
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: '1590969600', end_behavior: 'release', phases: [ { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 12, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='1590969600', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_print', 'quantity': 1}, ], 'iterations': 12, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => '1590969600', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 12, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(1590969600L) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(1L) .build()) .setIterations(12L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); // Starting a subscription 30 days from now const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: new Date('2020-06-01').getTime() / 1000, end_behavior: 'release', phases: [ { plans: [{price: 'price_print', quantity: 1}], iterations: 12 }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDate: stripe.Int64("1590969600"), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(12), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = DateTimeOffset.FromUnixTimeSeconds("1590969600").UtcDateTime, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 12, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Backdating a subscription

    When customers subscribe to the digital plan, The Pacific backdates their subscriptions to the first day of the current month. Backdating charges for time in the past and allows digital subscribers to access the website immediately.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=1585699200 \ -d end_behavior=release \ -d phases[0][plans][0][price]=price_print \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][iterations]=12
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBHCmVcdwIb5ye', start_date: '1585699200', end_behavior: 'release', phases: [ { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 12, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='1585699200', end_behavior='release', phases=[ { 'plans': [ {'price': "price_print", 'quantity': 1}, ], 'iterations': 12, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => '1585699200', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 12, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(1585699200L) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(1L) .build()) .setIterations(12L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); // Backdating a subscription to the first day of the previous month. const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: new Date('2020-04-01').getTime() / 1000, end_behavior: 'release', phases: [ { plans: [{price: 'price_print', quantity: 1}], iterations: 12, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDate: stripe.Int64("1585699200}"), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(12), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBa4ZI52MEpjSz", StartDate = DateTimeOffset.FromUnixTimeSeconds("1585699200").UtcDateTime, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 12, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Adding a schedule to an existing subscription

    The Pacific may discover that some of their original customers are on subscriptions without schedules. Because these subscriptions exist already, the subscription IDs can be passed in the from_subscription attribute to add a schedule. Passing the subscription IDs in this way creates a schedule with one phase that’s based on the current billing period of the subscription.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d from_subscription=sub_GB98WOvaRAWPl6
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ from_subscription: 'sub_GB98WOvaRAWPl6', })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( from_subscription='sub_GB98WOvaRAWPl6', )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'from_subscription' => 'sub_GB98WOvaRAWPl6', ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setFromSubscription("sub_GB98WOvaRAWPl6") .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ from_subscription: 'sub_GB98WOvaRAWPl6' });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ FromSubscription: stripe.String("sub_GB98WOvaRAWPl6"), } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { FromSubscription = "cus_GBGtWriHqoHUxj", }; var service = new SubscriptionScheduleService(); service.Create(options);

    While adding these schedules, some customers decide to get a print subscription so The Pacific adds a second phase to the schedule to start the print plan on the first day of the next month. The following use case shows an example of this process.

    Upgrading subscriptions

    The Pacific offers an option to start off on the print subscription for a month and then automatically add the digital option. Some customers prefer this because they can test out the print publication first and then decide if they want to continue or cancel their subscription.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=now \ -d end_behavior=release \ -d phases[0][plans][0][price]=digital \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][iterations]=1 \ -d phases[1][plans][0][price]=digital \ -d phases[1][plans][0][quantity]=1 \ -d phases[1][plans][1][price]=print \ -d phases[1][plans][1][quantity]=1 \ -d phases[1][iterations]=11
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1}, ], iterations: 1, }, { plans: [ {price: 'price_digital', quantity: 1}, {price: 'price_print', quantity: 1}, ], iterations: 11, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='now', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_digital', 'quantity': 1}, ], 'iterations': 1, }, { 'plans': [ {'price': 'price_digital', 'quantity': 1}, {'price': 'price_print', 'quantity': 1}, ], 'iterations': 11, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => 'now', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, ], ], 'iterations' => 1, ], [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, ], [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 11, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .build()) .setIterations(1L) .build()) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .build()) .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(1L) .build()) .setIterations(11L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1}, ], iterations: 1, }, { plans: [ {price: 'price_digital', quantity: 1}, {price: 'price_print', quantity: 1}, ], iterations: 11, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDateNow: stripe.Bool(true), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(1), }, { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), }, { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(11), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = SubscriptionScheduleStartDate.Now, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, }, }, Iterations = 1, }, new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, }, new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 11, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Downgrading subscriptions

    The Pacific also offers an option to start a subscription with both the print and digital publications, and then downgrade to only the print publication for the rest of the subscription. Customers use this option to test out both publications to see how they like them.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=now \ -d end_behavior=release \ -d phases[0][plans][0][price]=digital \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][plans][1][price]=print \ -d phases[0][plans][1][quantity]=1 \ -d phases[0][iterations]=1 \ -d phases[1][plans][0][price]=print \ -d phases[1][plans][0][quantity]=1 \ -d phases[1][iterations]=11
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1}, {price: 'price_print', quantity: 1}, ], iterations: 1, }, { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 11, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='now', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_digital', 'quantity': 1}, {'price': 'price_print', 'quantity': 1}, ], 'iterations': 1, }, { 'plans': [ {'price': 'price_print', 'quantity': 1}, ], 'iterations': 11, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => 'now', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, ], [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 1, ], [ 'plans' => [ [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 11, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .build()) .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(1L) .build()) .setIterations(1L) .build()) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .build()) .setIterations(11L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1}, {price: 'price_print', quantity: 1}, ], iterations: 1, }, { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 11, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDateNow: stripe.Bool(true), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), }, { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(1), }, { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(11), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = SubscriptionScheduleStartDate.Now, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, }, new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 1, }, new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 11, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Increasing the quantity

    You can also schedule increases to the quantities on a subscription. The schedule below starts with one instance of the digital publication for one month. In the second phase, the quantity is increased to 2 for 11 more months.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=now \ -d end_behavior=release \ -d "phases[][plans][][price]='price_digital'" \ -d phases[][plans][][quantity]=1 \ -d phases[][iterations]=1 \ -d "phases[][plans][][price]='price_digital'" \ -d phases[][plans][][quantity]=2 \ -d phases[][iterations]=11
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1}, ], iterations: 1, }, { plans: [ {price: 'price_digital', quantity: 2}, ], iterations: 11, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='now', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_digital', 'quantity': 1}, ], 'iterations': 1, }, { 'plans': [ {'price': 'price_digital', 'quantity': 2}, ], 'iterations': 11, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => 'now', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, ], ], 'iterations' => 1, ], [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 2, ], ], 'iterations' => 11, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .build()) .setIterations(1L) .build()) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(2L) .build()) .setIterations(11L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: 'now', end_behavior: 'release', phases: [ { plans: [{price: 'price_digital', quantity: 1}], iterations: 1 }, { plans: [{price: 'price_digital', quantity: 2}], iterations: 11, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDateNow: stripe.Bool(true), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(1), }, { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(2), }, }, Iterations: stripe.Int64(11), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = SubscriptionScheduleStartDate.Now, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, }, }, Iterations = 1, }, new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 2, }, }, Iterations = 11, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Using coupons

    Sometimes The Pacific runs subscription specials. The schedule below starts the customer on the print publication at 50% off for six months. The schedule removes the coupon from the subscription in the second phase, which entails the remaining six months.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=now \ -d end_behavior=release \ -d phases[0][plans][0][price]=price_print \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][iterations]=6 \ -d phases[0][coupon]=co_50_percent_off \ -d phases[1][plans][0][price]=price_print \ -d phases[1][plans][0][quantity]=1 \ -d phases[1][iterations]=6
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 6, coupon: 'co_50_percent_off', }, { plans: [ {price: 'price_print', quantity: 1}, ], iterations: 6, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='now', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_print', 'quantity': 1}, ], 'iterations': 6, 'coupon': 'co_50_percent_off', }, { 'plans': [ {'price': 'price_print', 'quantity': 1}, ], 'iterations': 6, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => 'now', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 6, 'coupon' => 'co_50_percent_off', ], [ 'plans' => [ [ 'price' => 'price_print', 'quantity' => 1, ], ], 'iterations' => 6, ] ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(1L) .build()) .setIterations(6L) .setCoupon("co_50_percent_off") .build()) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_print") .setQuantity(2L) .build()) .setIterations(6L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: 'now', end_behavior: 'release', phases: [ { plans: [{price: 'price_print', quantity: 1}], iterations: 6, coupon: 'co_50_percent_off', }, { plans: [{price: 'price_print', quantity: 1}], iterations: 6, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDateNow: stripe.Bool(true), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, Coupon: stripe.String("co_50_percent_off"), }, Iterations: stripe.Int64(6), }, { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_print"), Quantity: stripe.Int64(1), }, }, Iterations: stripe.Int64(6), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = SubscriptionScheduleStartDate.Now, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 6, Coupon = "co_50_percent_off", }, new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_print", Quantity = 1, }, }, Iterations = 6, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Changing tax rates

    The Pacific operates in several jurisdictions, and some of them have unique tax rates for subscription based businesses. One of these jurisdictions requires two tax rates: one for the first month when a customer initially subscribes, and one for recurring billings.

    curl https://api.stripe.com/v1/subscription_schedules \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer=cus_GBHHxuvBvO26Ea \ -d start_date=now \ -d end_behavior=release \ -d phases[0][plans][0][price]=price_digital \ -d phases[0][plans][0][quantity]=1 \ -d phases[0][plans][0][tax_rates][0]=txr_2J8lmBBGHJYyuUJqF6QJtaAA \ -d phases[0][iterations]=1 \ -d phases[1][plans][0][price]=price_digital \ -d phases[1][plans][0][quantity]=1 \ -d phases[1][plans][0][tax_rates][0]=txr_2J8lmBBGHJYyuUJqF6QJtaAA \ -d phases[1][iterations]=11
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.create({ customer: 'cus_GBXUtjZo0nHBmW', start_date: 'now', end_behavior: 'release', phases: [ { plans: [ {price: 'price_digital', quantity: 1, tax_rates: ['txr_2J8lmBBGHJYyuUJqF6QJtaAA']}, ], iterations: 1, }, { plans: [ {price: 'price_digital', quantity: 1, tax_rates: ['txr_2J8lmBBGHJYyuUJqF6QJtbBB']}, ], iterations: 11, }, ], })
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.create( customer='cus_GBXV9Q95NFT80k', start_date='now', end_behavior='release', phases=[ { 'plans': [ {'price': 'price_digital', 'quantity': 1, 'tax_rates': ['txr_2J8lmBBGHJYyuUJqF6QJtaAA']}, ], 'iterations': 1, }, { 'plans': [ {'price': 'price_digital', 'quantity': 1, 'tax_rates': ['txr_2J8lmBBGHJYyuUJqF6QJtbBB']}, ], 'iterations': 11, }, ], )
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\SubscriptionSchedule::create([ 'customer' => 'cus_GBXVvM3Lyqlb92', 'start_date' => 'now', 'end_behavior' => 'release', 'phases' => [ [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, 'tax_rates' => [ 'txr_2J8lmBBGHJYyuUJqF6QJtaAA', ], ], ], 'iterations' => 1, ], [ 'plans' => [ [ 'price' => 'price_digital', 'quantity' => 1, 'tax_rates' => [ 'txr_2J8lmBBGHJYyuUJqF6QJtbBB', ], ], ], 'iterations' => 11, ], ], ]);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder() .setCustomer("cus_GBXVzJZPdLuVU7") .setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW) .setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .addTaxRate("txr_2J8lmBBGHJYyuUJqF6QJtaAA") .build()) .setIterations(1L) .build()) .addPhase( SubscriptionScheduleCreateParams.Phase.builder() .addPlan( SubscriptionScheduleCreateParams.Phase.Plan.builder() .setPrice("price_digital") .setQuantity(1L) .addTaxRate("txr_2J8lmBBGHJYyuUJqF6QJtbBB") .build()) .setIterations(11L) .build()) .build(); SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.create({ customer: 'cus_G8BQyXLV4wIrlu', start_date: 'now', end_behavior: 'release', phases: [ { plans: [{price: 'price_digital', quantity: 1, tax_rates: ['txr_2J8lmBBGHJYyuUJqF6QJtaAA']}], iterations: 1, }, { plans: [{price: 'price_digital', quantity: 1, tax_rates: ['txr_1F6kmAAJVYItwOKqV9IWebBB']}], iterations: 11, }, ], });
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.SubscriptionScheduleParams{ Customer: stripe.String("cus_G8BQyXLV4wIrlu"), StartDateNow: stripe.Bool(true), EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)), Phases: []*stripe.SubscriptionSchedulePhaseParams{ { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), TaxRates: []*string{ stripe.String("txr_2J8lmBBGHJYyuUJqF6QJtaAA"), }, }, }, Iterations: stripe.Int64(1), }, { Plans: []*stripe.SubscriptionSchedulePhaseItemParams{ { Price: stripe.String("price_digital"), Quantity: stripe.Int64(1), TaxRates: []*string{ stripe.String("txr_1F6kmAAJVYItwOKqV9IWebBB"), }, }, }, Iterations: stripe.Int64(11), }, }, } schedule, _ := subschedule.New(params)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new SubscriptionScheduleCreateOptions { Customer = "cus_GBZpSoDXILjq1a", StartDate = SubscriptionScheduleStartDate.Now, EndBehavior = "release", Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, TaxRates = new List<string> { "txr_2J8lmBBGHJYyuUJqF6QJtaAA", }, }, }, Iterations = 1, }, new SubscriptionSchedulePhaseOptions { Plans = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = "price_digital", Quantity = 1, TaxRates = new List<string> { "txr_2J8lmBBGHJYyuUJqF6QJtbBB", }, }, }, Iterations = 11, }, }, }; var service = new SubscriptionScheduleService(); service.Create(options);

    Releasing a subscription from a schedule

    You can release a subscription from a schedule as long as the status of the schedule is not_started or active. Releasing a subscription leaves it in place but removes the schedule and any remaining phases.

    curl https://api.stripe.com/v1/subscription_schedules/sub_sched_1FdsKnBF6ERF9jhEWilacWsB/release \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::SubscriptionSchedule.release('sub_sched_1FdsKnBF6ERF9jhEWilacWsB')
    # Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.SubscriptionSchedule.release('sub_sched_1FdsKnBF6ERF9jhEWilacWsB')
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $schedule = \Stripe\SubscriptionSchedule::retrieve('sub_sched_1FdsKnBF6ERF9jhEWilacWsB'); $schedule->release();
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; SubscriptionSchedule schedule = SubscriptionSchedule.retrieve("sub_sched_1FdsKnBF6ERF9jhEWilacWsB"); schedule.release();
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const schedule = await stripe.subscriptionSchedules.release('sub_sched_1FdsKnBF6ERF9jhEWilacWsB');
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" schedule, _ := subschedule.Release("sub_sched_1FdsKnBF6ERF9jhEWilacWsB", nil)
    // Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var service = new SubscriptionScheduleService(); var schedule = service.Release("sub_sched_1FdsKnBF6ERF9jhEWilacWsB");

    Was this page helpful?

    Feedback about this page?

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.

    On this page