#lynn-millard_error
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/1441079273279459414
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, can you provide an example request ID where you see this error? it should look like req_1234
does this help
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such PaymentMethod: 'pm_1SVDqL00hi7eYUa5F5XS7GQ9'",
"param": "payment_method",
"payment_intent": null,
"payment_method": null,
"payment_method_type": null,
"request_log_url": "https://dashboard.stripe.com/acct_1PVvJTFdSXDAGnNH/logs/req_6DKLnpJaAT6jQA?t=1763568186",
yes, I can use the request ID in there, one moment
req_6DKLnpJaAT6jQA
it looks like the payment method in that request was created on account acct_1QiJqn00hi7eYUa5. since the request is being made on acct_1PVvJTFdSXDAGnNH, the payment method would have to exist on that account in order for the request to be successful
the payment method was created with this request https://dashboard.stripe.com/acct_1QiJqn00hi7eYUa5/logs/req_SyR0LvS6Hat2YM
if you're finding that you need to use payment methods across multiple connected accounts, you may be interested in this approach https://docs.stripe.com/connect/direct-charges-multiple-accounts
can i tell which accounts codes were used to create the pm and the subsequent requests in dashboard log?
yes, in Workbench you can look at the Stripe-Account header to determine which account the request was executed on. if there's no Stripe-Account header, the request was made on your own platform
i think i gave you the request for a different error than i originally stated
how do i see the account code for the created pm
Hi there ๐ jumping in as my teammate needs to step away.
There isn't a great way to tell from the Payment Method itself which account it belongs to. If you're able to see and retrieve it, then it belongs to your account, otherwise you sort of need to keep track of that.
Can you help me understand how you've structured your Connect integration?
I also see the request you shared was a livemode request. Did you get this flow working as expected in testmode or a sandbox first?
no it was working with separate accounts then we setup connected accounts.
its works 95% of the time then about 5-10 times a day we get the payment method not found. almost seems like a timing issue. like the pm isnt available yet
another clue. before we setup connected accounts we would get the payment error and i would wait up to 10 seconds and retry with the idempotency key. and that would usually work. i tried that with the create customer for a connected account and it does not appear to help.
Do you have examples of where it worked? Because this flow should never work the way it's coded based on what I'm seeing.
Idempotency keys just cause the new request to return the same response as the previous request. They're meant for safely retrying requests that you don't know the result of due to network issues, not to retry a request from a business logic perspective.
well that is what was recomended and in that it case seemed to work. just another data point ...
Who recommended that, because it clashes with our official documentation, which is what I recommend adhering to.
https://docs.stripe.com/api/idempotent_requests
This isn't a timing issue, it's a coding issue. Do you have examples of where this worked as expected? What are you trying to do here, are you trying to clone payment methods to your Connected Accounts?
(at least I'm pretty sure it's not a timing issue)
this is how we do it. we use the payment element in react to get the payment method. i pass the connected account code to the element.
we pass the pm to the backend and it uses the same account code to create a customer attached to the pm. then create a pement intent and charge the card.
var requestOptions = new RequestOptions();
var AccountCode = settings.GetSetting(StripeConstants.AccountCode);
if (!string.IsNullOrEmpty(AccountCode))
requestOptions.StripeAccount = AccountCode;
var service = new PaymentMethodService();
paymentMethod = await service.GetAsync(paymentMethodID, requestOptions: requestOptions);
before i create a customer i call that code and it gets the error
Ah, these are two different Connected Accounts you're using. You're creating the Paymetn Method on one account, then trying to use it on another Connected Account. That isn't supported.
Are you intending to do this?
no i didnt say that. i am passing the same account code to the react component and in the back end
That's not what the requests are showing me
all of them or just the error?
I'm not sure, you've only shared the errored one. But it wouldn't error if the same Account ID is used consistently.
ok so what are you are suggesting is that i may have an occasional mismatch of the account codes?
if you want to see a successful charge what do you want to see?
what should i give you
You need to debug why your system craeted the PM on one Connected Account:
https://dashboard.stripe.com/acct_1QiJqn00hi7eYUa5/logs/req_SyR0LvS6Hat2YM
then tried to use it for a different Connected Account:
https://dashboard.stripe.com/acct_1PVvJTFdSXDAGnNH/logs/req_6DKLnpJaAT6jQA
Then make whatever coding changes are needed to prevent that from continuing to happen.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
can i tell which account the pm was created on in the logs?
I'm not as familiar with the dashboard side of Stripe (my teammates and I specialize in helping with our API in this forum), but I think the logs may be buried inside of the Connected Accounts in the dashboard, so it may tell you sort of indirectly.
i can get the pm from the error then i need to track backwards to find where it was created
I shared a link to the request where it was created for your convenience in my earlier message. Not sure if the link will take you straight there since it was done in a Connected Account though, but the Account ID is in that second URL.
sorry im trying to follow how you determined the requests were made on different accounts.
i assume i start here https://dashboard.stripe.com/acct_1QiJqn00hi7eYUa5/logs/req_SyR0LvS6Hat2YM
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Well I had a head start because I knew what to look for based on the error. That error + Connect is almost always the wrong account context being used.
It might be hard if you don't have logging for this on your end.
so my method is ok as long as the account codes are consistent across the requests. i hope so since i have numerous companies charging thru the system.
Yup, exactly.
one more question. creating a customer is required in order to allow subsequent charges to a payment method?
Yes