#hassan
1 messages ยท Page 1 of 1 (latest)
Hello ๐
You'd want to use Subscription Schedule for this
https://stripe.com/docs/billing/subscriptions/subscription-schedules
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#start-subscription-future
Would recommend reading through above docs as it covers the usecase in detail
I tried this, but its a bit difficult to understand. the docs doesnt tell me how to get authorisation from the user.
unlike the payment intent guide or the subscription guide.
Ah it assumes you've collected the payment method already and attached it to the customer as default.
My assumption is this (correct me if wrong):
- Go through the setup Intent with the user to get the authorisation with bank
- Upon success, create a schedule and attach to subscripion.
- Update subscription billing method to authorised setup payment method thing
yes exactly this. So do i do this first then attach a schedule?
You can also set the PaymentMethod as default on customer.invoice_settings.default_payment_method which the future subscription would use automatically
if thats the case, that means i must change a lot of my code. As currently my code focuses on PaymentIntent which means taking some money from the user now
Are these PaymentIntents being created in off-session mode?
I am not setting this field. So whatever the default is
ah so your customer is always around to authenticate in case 3DS is triggered.
yes
I believe you can also do following;
1/ Change your PaymentIntent flow to store payment method for future use by setting setup_future_usage parameter to off_session
2/ Then you can set the payment method as default on the customer as I mentioned above
https://stripe.com/docs/payments/save-during-payment
OR
2/ You can pass that payment method as default_payment_method when you create a subscription schedule
https://stripe.com/docs/api/subscription_schedules/create?lang=cli#create_subscription_schedule-default_settings-default_payment_method
we dont process nothing without customer
Ah ok, so your saying i can take my customer through a paymentIntent without any amounts? then grab the payment method, save it to customer as default, then make a call to create the subscriptions
Ah ok, so your saying i can take my customer through a paymentIntent without any amounts?
No, since you're using PaymentIntents the amount needs to be greater than zero. I am suggesting that you do it the next time your donor wants to donate ๐
thing is, my customer at the time will not be donating any amounts. Rather they want to set up a future dated subscription.
And these are potentially new customers
Ah I see. In that case you'd want to use SetupIntents instead
https://stripe.com/docs/payments/save-and-reuse
SetupIntents allow you to save a payment method without charging it upfront
thanks! just what i needed.