#mattcomroe_api

1 messages Β· Page 1 of 1 (latest)

keen stirrupBOT
#

πŸ‘‹ 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/1471212179045879917

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

molten pivot
#

Hi there. Looking

upbeat berry
#

Hello! I created a thread with the same topic yesterday if you would like to refer to that for some context. I went and updated my code to pass in currency as a parameter to the javascript used to created the Payment Element, but it doesn't seem to have changed the error I'm getting.

#

I'm pretty sure i'm passing in the currency parameter correctly, but I'm thinking you'd be able to confirm that on your side.

molten pivot
#

Okay, so yesterday you discussed what you were doing with various members of my team and the last thing was that you discussed with Toby that you would move to the "deferred intents" flow, which is where you render the payment element first and collect card details and then create/confirm a SetupIntent after. This is the flow that allows you to pass options to the Element like currency, mode, etc

#

But in seti_1Szi3WHAuKxNQma4pQjtz9Xg, you aren't doing that; you've created the SetupIntent first and it looks like you're rendering the Payment Element using its client secret, which means that the Payment Element takes its configuration from the SetupIntent

upbeat berry
#

i can't create the setup_intent first? and then pass presentment currency to the payment element which also has the setup intent's client secret passed to it?

#

sorry if i misunderstood what Toby told me; he presented the deferred intent option along with documentation but i misread what he said about passing currency to the payment element.

#

i thought it would apply to either flow.

molten pivot
#

No; if you look at our Stripe.js reference, you'll see we have different options available for creating Elements with or without client secret. You can pass currency when creating the SetupIntent first, but I think that is mostly about what payment methods appear in the Element

#

still looking

upbeat berry
#

I guess I have a really silly question then.. that deferred intents flow can have currency dictated by the payment element, which then creates the setup intent. But i can't set currency on the setup intent myself via the API? And since the card isn't being charged what would the currency even matter at that point? Shouldn't it not matter until the card is attempting to charge?

#

also, sorry i didn't say it earlier but thank you for your help. i appreciate your time and expertise!

molten pivot
#

Have you seen something like this in live mode?

upbeat berry
#

yes. it was brought to me yesterday from our support folks.

molten pivot
#

Do you have a SetupIntent id?

#

or any ids related to what happened there?

upbeat berry
#

here is one example

#

req_zyQnui3gijLcFU

#

i don't know if i'm able to search for that exact error in the API logs so it's hard for me to say if this is something recent or if it's always happened. but we have had our current flow for taking payment methods from connected customer's clients for quite awhile now.

#

that might be a question for me to ask Stripe Support; if they can pull those logs or how I can myself to see any patterns.

#

but i just find it a little bit improbable that we've had this problem all along and this is the first that i'm hearing about it. the one customer in MX that brought it to our attention has had an active stripe account since 2023.

#

and we aren't doing anything special for MX versus other non-US based connected customers. maybe there's something special about MX, but i'm not sure.

molten pivot
#

Do you have a MX-issued card or payment from MX-issued card that was collected with the same flow at some point in the past? If all your cards are collected this way you should be able to get it in the Stripe dashboard on the transactions list page

upbeat berry
#

let me just grab the most recent CC payment to that connected customer; that likely would have been created with that same flow. give me a minute to find all that, please.

molten pivot
#

I wonder if we broke this flow

#

oh if that customer has older cards/payments I can find it

#

ah it might be the same customer, but have a different cus_123

upbeat berry
#

pi_3SzKXRBnxMPxdETu2EuyG2h7 is a recent payment

#

with a setupintent from last year

#

seti_1Rl8MIBnxMPxdETuV52RvfnW

molten pivot
#

okay that's great

#

we must have broken this

upbeat berry
#

just by eyeballing it looks like a similar setupintent, although I am not passing a payment method type to the one that failed.

#

that shouldn't matter tho if the payment element displays

molten pivot
#

Yeah, I think the validation that is causing it to fail is around presentment currency for MX card/MX stripe account as the MoR

upbeat berry
#

so we found a bug? i'm ready for my "Power User" badge now. πŸ˜„

molten pivot
#

I think what's happening is that, under the hood, we assign a currency to the SetupIntent, which is causing the failure, but the currency that is being assigned is your platform's default (usd) and not the on_behalf_of connected account's, which is MXN

upbeat berry
#

see, as a non-stripe developer i would have assumed that it would get currency from that on_behalf_of if present.

molten pivot
#

As a Stripe developer, I also would have expected that 🫠

keen stirrupBOT
#

Hello @upbeat berry, we have sent you a direct message, please check it at https://discord.com/channels/@me/1470897862782226555

  • πŸ”— The message has instructions on how to grant read and write access to your Stripe Dashboard for our Developer Support team, in order to help you more effectively.
molten pivot
#

I sent you a DM to ask for consent to have a look at your dashboard - I want to find the most recent MXN transaction using a card that was setup in the same way the most recently

#

So I can get an idea when this changed

upbeat berry
#

i think i might have approved this already?

#

(like 30 seconds ago)

#

as you are poking around; anything I can do to help you?

molten pivot
#

No. I think I'll need to do some more investigation and talk to our product team, which I can do asynchronously and we can convert this to an email thread so you don't have to stick around here

upbeat berry
#

sounds good. i won't hold you to it, but do you have a sense for how long something like this will take to get fixed and out to PRD? hours/days/weeks?

molten pivot
#

To be frank, the range is wide. It depends on a lot of factors

keen stirrupBOT
#

Hello @upbeat berry, we have sent you a direct message, please check it at https://discord.com/channels/@me/1470897862782226555

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
upbeat berry
#

understood.

molten pivot
#

The message I just sent you gives instructions on creating a case which will get an email to me and I'll follow up with you there

upbeat berry
#

believe me, understood.

#

ok... will do! thanks again for all your help today. i appreciate you!

#

sorry to be a pain, but i don't think that "magic link" worked; it just took me to the support homepage and i wasn't prompted to create a case like the instructions said would happen. I am logged in to Stripe.

#

i can go through the steps and just make a case and include the discord info in the details; didn't know if that would be good enough.

molten pivot
#

It generally is

#

I'm going to try it but I need to onboard a Stripe account whose country is Mexico first

upbeat berry
#

well, i'd certainly like to avoid that if possible as that would be a decent-sized rewrite of a sensitive part of our software (switching to deferred intents instead of continuing to use setup_intent first and the payment element linked via the client secret).

#

ok; if you don't need anything else from me i think i'm all good on my end for now! i'll fill out that support case now. thank you!

molten pivot
#

Have a good one!

upbeat berry
#

you as well...