#dingkai031

1 messages ยท Page 1 of 1 (latest)

paper barnBOT
worthy birch
#

You can listen to payment_intent.succeeded event. When notified, create a subscription schedule and let it start the subscription accordingly.

jaunty nova
#

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

worthy birch
#

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.

jaunty nova
inner ember
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

jaunty nova
#

okay sure

inner ember
#

ok could we go back one step, let's forget about the how, would you mind explaining what are you trying to achieve?

jaunty nova
#

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

inner ember
#

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

jaunty nova
#

but if using 2 phased, scheduled subscription. What should I pass for the phase 2 iteration?

inner ember
#

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

jaunty nova
#

okay, and when do I start the subscription schedule? I was thinking of using a custom stripe checkout form

inner ember
#

Stripe Checkout doesn't support Subscription Schedules

jaunty nova
#

okay, so how is the payment works for the subscription schedules api?

inner ember
#

you have a couple of options, but this is why I was suggesting using Subscriptions instead because they are compatible with Checkout

jaunty nova
#

ahh I see, if it's supported with checkout... I can go with the subscription API

inner ember
jaunty nova
#

Thanks for the explanation, I'm understand now.

inner ember
#

let me know if you need any more help