#hassan

1 messages ยท Page 1 of 1 (latest)

noble hearthBOT
prisma gazelle
#

Would recommend reading through above docs as it covers the usecase in detail

marble mortar
#

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.

prisma gazelle
#

Ah it assumes you've collected the payment method already and attached it to the customer as default.

marble mortar
#

My assumption is this (correct me if wrong):

  1. Go through the setup Intent with the user to get the authorisation with bank
  2. Upon success, create a schedule and attach to subscripion.
  3. Update subscription billing method to authorised setup payment method thing
marble mortar
prisma gazelle
#

You can also set the PaymentMethod as default on customer.invoice_settings.default_payment_method which the future subscription would use automatically

marble mortar
#

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

prisma gazelle
#

Are these PaymentIntents being created in off-session mode?

marble mortar
#

I am not setting this field. So whatever the default is

prisma gazelle
#

ah so your customer is always around to authenticate in case 3DS is triggered.

marble mortar
#

yes

prisma gazelle
#

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

marble mortar
#

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

prisma gazelle
#

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 ๐Ÿ™‚

marble mortar
#

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

prisma gazelle
#

SetupIntents allow you to save a payment method without charging it upfront

marble mortar
#

thanks! just what i needed.