#raimund_api

1 messages ¡ Page 1 of 1 (latest)

dense wrenBOT
#

👋 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.

thin badger
dusky acorn
#

But then I'll have to pass in a redirect url, or not?

thin badger
#

Yes, a return url

dusky acorn
#

And what would that URL need to be? Just where the request came from?

thin badger
dusky acorn
#

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?

thin badger
#

Let's step back....

#

You've already collected the ba_ and you're passing that details on the SetupIntent.

dusky acorn
#

Correct

#

(It could also be a card btw)

thin badger
#

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?

dusky acorn
#

Yup

thin badger
#

Can you walk me through your entire flow here?

dusky acorn
#

I'll try to explain what we've got at the moment and where we want to go.

thin badger
#

What are you trying to accomplish exactly?

dusky acorn
#
  • 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.

thin badger
dusky acorn
#

Sorry, what's the "legacy object"?

thin badger
#

ba_

#

or a card id in case of cards lik card_

dusky acorn
#

Cards come through as pm_ in our system.

thin badger
#

Then, that would work fine

dusky acorn
#

So you're saying we don't need to do this SetupIntent thing at all? Or you mean only for cards?

thin badger
#

Can you create a PaymentIntent using that ba_ object to charge this customer in test mode?

dusky acorn
#

Yes, we've done that. In fact, they're already using it in live.

thin badger
#

So why use SetupIntents? Is there some other context I'm missing here? Did you see errors? Did you recieve any emails from Stripe?

dusky acorn
#

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.

thin badger
#

hhmm, let me review this on my end. Hang tight

dusky acorn
#

Thanks.

thin badger
dusky acorn
#

Well, I'm asking both. We'll have new customers as well.

thin badger
dusky acorn
#

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?

thin badger
#

Yes, it is the same thing.

dusky acorn
#

So I was basically worried about nothing. Thank you, and sorry for taking your time unnecessarily.