#bioworkflows

1 messages · Page 1 of 1 (latest)

tight berryBOT
restive furnace
naive helm
#

I see, then when do I use setup mode and when do I use subscription mode?

#

I thought that a SetupIntent will be created if a new subscription is created, otherwise PaymentIntent or Invoice will be created.

restive furnace
#

Can you tell me what problem are you trying to resolve?

naive helm
#

I am trying to setup subscription (fixed price), with or without free trial. I have always been using subscription and the webhook has been working by assuming the existence of either a PaymentIntent or SetupIntent, which I thought correspond to immediate subscription (a payment is required) and subscription with free trial (payment later). I have recently upgraded my stripe API version, has something changed in the handling of mode="subscription"?

#

If you check the event, the subscription sub_1MdneWDccGCU5vwk4FTqaeZ0 has a free trial, and an invoice in_1MdneWDccGCU5vwkUq7c2voS of zero dollar is created.

#

I think the previous version would respond with an SetupIntent without invoice.

restive furnace
#

No, setup_intent is only set for setup mode checkout sessions

naive helm
#

So there must have been an API change. Is it true that I should use subscription for subscription without free trial, and setup for subscription with free trial?

restive furnace
naive helm
#

Thanks. Let me read the documentation in more detail.

#

I will ask in the main thread if I have more questions.

naive helm
#

@restive furnace setup does not work with prices.

#

Previously, I have mode="subscription" and price in line_items. Stripe would return SetupIntent with the right amount.

#

Now I get Mode cannot be setup when using prices. when I change the mode to setup

woeful moon
#

are you trying to collect the PaymentMethod details up front?

naive helm
#

Yes, but previously stripe would start charging customers with the right amount after the trial period, right?

woeful moon
#

and yes, Stripe would then charge the Customer with the correct amount after the trial period

naive helm
#

Let us back up a bit. For one time payment, I use mode="payment". For subscription without trial period, I use mode="subscription" and stripe will charge now and every month afterwards.

#

For subscription with trial period, how can I let stripe collect payment method now and charge customer after trial period?

woeful moon
naive helm
#

Do you mean I do not need to handle SetupIntent at all? Basically, I can use mode="subscription", lineitems with price, payment_method_collection="always", and metadata={"trial_period_days": 30} to allow stripe to collect payment method upfront, and charge monthly afterward trial period.

#

Then in the webhook, there will always be a PaymentIntent with payment information, and the first payment will have amount zero.

woeful moon
#

there will be no PaymentIntent if the first payment is $0

#

i really suggest you just test it out with test clocks