#dingkai031
1 messages ยท Page 1 of 1 (latest)
You can listen to payment_intent.succeeded event. When notified, create a subscription schedule and let it start the subscription accordingly.
I have a subscription product with 2 price, one is paid weekly and the other is monthly monthly.
Because I see that we can't use a paid trials (correct me if I'm wrong), so I'm thinking to use scheduler subscription api.
What I want to make sure is, If I create a subscription schedule from payment_intent.succeeded event, will my customer be charged again? I mean, I don't see we pass parameter to tell the scheduler api that the payment is success
In this case, you can use setupIntent to collect the payment_method without charing the customer, listen to setup_intent.succeeded, when notified, start the subscription schedule.
Btw you can't mix prices with different recurring intervals in the same subscription, you can create two subscriptions for the two prices.
but in the dashboard, there's an option to set it.
In the scheduler subscription api. I was thinking to use the weekly subscription id for phase one, after that it will release and goes back to default.
isn't that how it works?
๐ taking over for my colleague. Let me catch up.
okay sure
ok could we go back one step, let's forget about the how, would you mind explaining what are you trying to achieve?
okay, what I would like to achieve is create a subscription for my customer that have a "paid trials" plan for a week, after a week it will start a monthly plan (with different price) for 1 product. and the customer will be charge automatically every month until they cancel the subscription
ok you can do that with either a Subscription (updating the price after the first payment, I'll explain how next) or a two-phased Scheduled Subscription
it's really up to you to decide on the which is best for you
but if using 2 phased, scheduled subscription. What should I pass for the phase 2 iteration?
something like:
phases: [{
items: {
price: "price_for-week-id",
quantity:1
},
iterations: 1
}, {
items: {
price: "price_for-month-id",
quantity:1
},
iterations: 1
}].
end_behavior: "release"
you can use test clocks to advance the Subscription Schedule and see how the Subscription evolves
okay, and when do I start the subscription schedule? I was thinking of using a custom stripe checkout form
Stripe Checkout doesn't support Subscription Schedules
okay, so how is the payment works for the subscription schedules api?
you have a couple of options, but this is why I was suggesting using Subscriptions instead because they are compatible with Checkout
ahh I see, if it's supported with checkout... I can go with the subscription API
yes, what I would do is to create a subscription with a weekly price, and once I receive the invoice.paid event, would then proceed on changing the price to monthly as explained here https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing
but I would use https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior none and https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_cycle_anchor unchanged
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks for the explanation, I'm understand now.
let me know if you need any more help