#nepotist84
1 messages ยท Page 1 of 1 (latest)
Hi Vanya, here is the request where I change setup_future_usage: https://dashboard.stripe.com/test/logs/req_Gs5gLObpledzSR
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hi! Let me help you with this.
I don't think I follow what you're trying to do. Do you want to charge the PaymentMethod automatically? Or send Invoices for the customer to pay each time on their own?
Sure, it's definitely complicated so I will try to clarify... ๐
I am trying to send a subscription invoice to the customer to pay with sofort, then save their IBAN so I can charge them automatically on later invoices.
My process now is:
Create a subscription with 'sofort' as a payment_method_type and collection_method 'send_invoice'
Update the payment_intent to 'setup_future_usage' = 'off_session'
Try to pay the invoice with sofort
I expect that the IBAN would be saved as a sepa_debit payment method on the customer
I would recommend not mixing those and create a separate SetupIntent or a Checkout Session with mode "setup" to collect the PaymentMethod for future usage
Can I use the SetupIntent and 'send_invoice' collection_method?
My impression is that SetupIntents work when the customer is on_session
To begin
SetupIntent is a one-time thing for collecting PaymentMethods for future usage.
I think there's some confusion about the terms here. You can read more about SetupIntent here: https://stripe.com/docs/payments/save-and-reuse
But maybe you could describe what user flow you imagine (without Stripe concepts), and I will try to suggest the best solution.
I need to take care of something offline briefly.... 5 minutes max
Can we leave the chat open and I will be right back?
Sure
Okay, so I would like to be able to send a customer an invoice through stripe that offers three payment methods: card, paypal, and sofort. The goal is to collect their payment method preference and update a subscription to charge that payment method automatically in the future.
So the customer receives an invoice from stripe in their email, they choose to pay with card/paypal/sofort, we save that choice to their subscription so they can be charged automatically
You will then be better off creating a Checkout Session with mode: "subscription".
The Subscription will be charge_automatically by default, and, initially, the customer will get the payment page where you will add their preferred payment method.
You can follow this guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
Can this work for an existing subscription too? To update the payment method?
Just one note: Checkout Session URLs expire. So if you want to send it in the email, I would recommend sending a URL to your own website, that will create a fresh Checkout Session on the fly and redirect the customer to it.
For existing, you can use a Checkout Session with mode: "setup", that will allow you to collect a Payment Method for future usage: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=checkout
Then you can update the existing Subscription.default_payment_method with the newly created one: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
Thanks for the help
And the collection_method, of course.
Happy to help!
You too!