#raimund_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1301984314480918570
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, I suspect it's related to https://docs.stripe.com/api/setup_intents/create#create_setup_intent-automatic_payment_methods-allow_redirects parameter you passed when creating the SetupIntent. Are you able to remove automatic_payment_methods.allow_redirects and try again?
But then I'll have to pass in a redirect url, or not?
Yes, a return url
And what would that URL need to be? Just where the request came from?
It can be a URL that you want your customers to return to: https://docs.stripe.com/api/setup_intents/create#create_setup_intent-return_url
Sorry, I think my brain is a bit slow on a Friday evening. What I'm trying to do is create a SetupIntent and confirm it right away on the same request which registers the PaymentMethod. Does that mean the user might still have to do something outside our system?
Let's step back....
You've already collected the ba_ and you're passing that details on the SetupIntent.
Can you attempt to make the same call without the automapic pm, just the following?
customer: "cus_R8OQgTTJA9CupG",
payment_method: "ba_1QG7dOBIMZTJKM1cfFm9igV4",
Are you also trying to confirm on the server side?
Yup
Can you walk me through your entire flow here?
I'll try to explain what we've got at the moment and where we want to go.
it's already attached to this customer, https://dashboard.stripe.com/test/logs/req_R7SzHSLH5HhHe6 using the legacy objects
What are you trying to accomplish exactly?
- We've got several customers with registered payment methods.
- They pay into our platform whenever they feel like it.
- This works via PaymentIntents.
What we want to add now is a function by which they can just schedule payments that we calculate every week. The amounts vary. I've been told before that since these payments will be actioned without user involvement, we should do a SetupIntent as well when the payment methods are registered.
So the idea is we add the payment method as we're already doing and then perform the SetupIntent directly afterwards.
"Directly afterwards" meaning that we're doing it in the same step, but it's still two separate requests to Stripe.
I hope I'm explaining this in an understandable fashion.
This does not make sense to me, 'So the idea is we add the payment method as we're already doing and then perform the SetupIntent directly afterwards.'
If the payment method is already attached to the customer, you can just pass the legacy object when creating the PaymentIntent: https://docs.stripe.com/payments/payment-methods/transitioning#compatibility
Sorry, what's the "legacy object"?
Cards come through as pm_ in our system.
Then, that would work fine
So you're saying we don't need to do this SetupIntent thing at all? Or you mean only for cards?
Can you create a PaymentIntent using that ba_ object to charge this customer in test mode?
Yes, we've done that. In fact, they're already using it in live.
So why use SetupIntents? Is there some other context I'm missing here? Did you see errors? Did you recieve any emails from Stripe?
None of those.
Until around two months ago we were still on the charges API. When we started looking into this new functionality, I had a few chats with your colleagues, and they told me we need to migrate to PaymentIntents first which we did. And at the same time they also mentioned that in order to set this up completely, we need to do the SetupIntent as well.
hhmm, let me review this on my end. Hang tight
Thanks.
In general, yes we encourage you to migrate to SetupIntents, https://docs.stripe.com/payments/save-and-reuse. However, you're asking what to do with the bank accounts that you've already collected from the Charges API
Well, I'm asking both. We'll have new customers as well.
For new customers, you would want to use https://docs.stripe.com/payments/save-and-reuse. However, if you're saving the payment method for futre use while you're accepting the first payment, you would want to use this guide: https://docs.stripe.com/payments/save-during-payment
I think I know where this is going. Sorry, I hadn't realised what the SetupIntent actually is. I thought it was something on top of adding the PaymentMethod, but it's actually the same thing?
Yes, it is the same thing.
So I was basically worried about nothing. Thank you, and sorry for taking your time unnecessarily.