#alexb_ca
1 messages · Page 1 of 1 (latest)
Hello alexb_ca, we'll be with you shortly! 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.
• alexb_ca, 6 days ago, 78 messages
Can you share the request ID (req_xxx) of the error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Hi we didn't make an API request
We merely instantiated your <PaymentElement/> in react
Can you share the payment intent (pi_xxx) that is used in the Payment Element?
We don't have access to that as far as I know
We don't make a payment intent
if there is one, your code is doing it
you send us it after the purchase is complete
<PaymentElement
onLoadError={(err) => {
const nested = new NestedError(
`PaymentElement failed to load: ${err.error.message}`,
err.error
);
captureException(nested, { price, currency });
setError(nested.message);
}}
onReady={(element) => {
element.focus();
if (onReady) onReady();
}}
options={{ readOnly: submitting, terms: { card: 'never' } }}
/>
export const ElementsContext = (props: PropsWithChildren<Props>) => {
const { price, currency, children } = props;
if (!price.unit_amount)
throw new Error(`unit_amount required on price ${price.id}`);
const options: StripeElementsOptions = {
mode: 'subscription',
amount: price.unit_amount,
currency,
// Fully customizable with appearance API.
appearance: {
theme: 'stripe',
disableAnimations: true,
labels: 'floating',
},
};
return (
<Elements stripe={stripePromise} options={options}>
{children}
</Elements>
);
};
Thanks for sharing! It looks like you're using deferred intent flow.
Can you share your development website, so that I can check the client error?
how would you do that exactly?
I don't know how to reproduce this
We've had many many users use our implementation without issue, just one so far hit this issue in production
Your PaymentElement raised the error in its onLoadErrorHandler, so I was hoping you could tell me what to change to fix it from happening again
If the issue can't be reproduced and no request history can be provided, I'm afraid I'm unable to identify what the issue is. It's likely that the payment method configuration in Dashboard might have been changed by your team during the period that no available payment method for the specific currency can be used.
"no request history can be provided"
umm... its you (stripe) who is not providing the request history, no?
wouldn't it make sense for the error to include a request id, or a payment intent id?
how am I supposed to provide request history?
no changes have been made to our payment configuration, its a tiny team here, I'm the only one with access
how would I capture "request history" in the future, so that when this happens again I can provide it?
Can you share your account ID, so that I can take a closer look at how your integration works? You can find your account ID by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123. I'll check from my side if I can find any request history.
for us payments are critical, we can't have users unable to pay due to opaque errors with no resolution
could you first just tell me how I can provide request history in the future for this issue?
what do I need to do exactly?
For server request, the request ID will be provided in the response message.
For client request, the request ID can be found in the network logs.
I mean for this specific case.
There is no server code here.
The client code is your code.
In fact, its probably a PCI violation for me to access the requests, no? eg its your code, running in your iframe, specifically for that reason
so again, its not a hard question - given the context and use case I am using here, how do I capture request history in the future?
I am pretty sure the answer is that I can't.
instead, your error should include request history.
shouldn't there a be a log of this error somewhere?
Request is in the network logs and they are encrypted. The only way is to get the request log is by reproducing the issue in your website and monitoring the network logs to get the request logs. We will then be able to trace the errors. Without any of your account or object information, we are unable to trace the cause of the issue.
In your case, I might be able to find the request logs if you can provide the account ID (acct_xxx).
would you (stripe) consider including the request id (or something useful) in the error in the future?
This feature request makes sense. I'll forward it to the team.
thanks. It seems otherwise you're making it very hard to trace.
the account id is acct_1JCo5qDgTpZ042Bg
The timestamp in our error logs is Oct 22, 2023 12:47:36 PM UTC
I could also share the user's IP address if needed
we created a customer shortly before this error evt_1O413uDgTpZ042BgmKANnkuv
I'm not seeing anything in logs or events at https://dashboard.stripe.com/events
does that give you enough to go on?
Checking if I can find anything
would having the user's IP address help?
what could cause this error? eg maybe if I understood what the possible cause(s) for this error are, I could review our setttings and setup and integration
Thanks for waiting! Unfortunately, I'm unable to find this error trace on your account during this period of time. Can I suggest you writing to Support https://support.stripe.com/contact, so that we can follow up and check with relevant team? It’ll be helpful if you can include the error message, timestamp and relevant information in your email.
I find writing to support very unproductive, which is why I came here
Usually when I write support it takes many many messages before they acknowledge an issue and decide to look into it
Could you share with me what are some of the possible causes of this issue?
Some possible reasons can be:
- The minimum charge amount doesn't meet: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
- Payment method configuration might have changed
the price in question is price_1M0UfIDgTpZ042BgbtQTIBWC which has an unit_amount of 219399 inr which is approx USD 26.38, so I think we can rule out the first reason
for the second reason, how do you mean "might have changed" changed since when? or am I misunderstanding?
In our system the user would have selected a plan (product), then we'd send them to our checkout page where we rendered <PaymentElement/>. At no time did we use or configure or change or reference a payment method configuration during this time, nor any time recently
so I need to write to support to try to get a resolution on this? Can you give me something specific to say to them to avoid a huge email chain before they agree to look into it?
Thanks for sharing the information. These two are the possible reasons off the top of my head, but I don't have the full picture on the cause of the issue. I understand that that it might take some time for Support team to get back. Unfortunately, I don't have enough access to the tools to investigate the issue. I'd recommend including this Discord thread link, details of the issue with the error message, timestamp and relevant information in the email to Support.
ok thanks.
New details! I figured out how to reproduce, simply go here: https://syncwith.com/billing/checkout/price_1M0UfIDgTpZ042BgbtQTIBWC?currency=inr
Our app spins forever loading (I will fix that in the future to show an error)
And in the console logs i see an unhandled rejection that looks like its in a script from js.stripe.com
and in our backend logs (sentry) we see the error I shared initially
I'm unable to login. Will you be able to provide the login credentials?
Ah. Yeah I'll get back in a few minutes with steps for that.
in the meantime, now that I can reproduce it is there something I can capture that will help you?
(I need to find a simple flow for you to be able to repro... eg you'd need to be logged in, have a customer created etc)
controller-96808ed5cafa652d64b4c71dbe466a8e.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'queuedMessages')
at e.value (controller-96808ed5cafa652d64b4c71dbe466a8e.js:1:625478)
at e.value (controller-96808ed5cafa652d64b4c71dbe466a8e.js:1:625324)
at controller-96808ed5cafa652d64b4c71dbe466a8e.js:1:630501
I'd need the website access to network details
I think those are screenshots of your code where the stack trace for that unhandled promise rejection is
can I not access the network details?
You can! I'd recommend going to the network logs and look for the fetch requests with error
If there is no direct error, then it's likely the error message is wrapped inside one of the requests to Stripe
One of them will likely include "Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard" in the response
I looked through a few (having filtered the list down to ones involving stripe) but I am not seeing much/anything yet. I'll work on steps for you to repro.
any hints on where to look?
ok I found repro steps, they are wierd but simple:
- go to https://syncwith.com/pricing, click
buy business(any one) - you'll arrive at stripe checkout (ignore this)
- now visit https://syncwith.com/billing/checkout/price_1M0UfIDgTpZ042BgbtQTIBWC?currency=inr
I see the full error message:
instrument.ts:124 No valid payment method types for this configuration. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and invoice settings (https://dashboard.stripe.com/settings/billing/invoice) and that the
amount(2499) is not lower than thecurrency(inr) minimum: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts.
In your client code, what did you set the amount as?
More specifically, the amount in options here:
if (!price.unit_amount)
throw new Error(`unit_amount required on price ${price.id}`);
const options: StripeElementsOptions = {
mode: 'subscription',
amount: price.unit_amount,
currency,
// Fully customizable with appearance API.
appearance: {
theme: 'stripe',
disableAnimations: true,
labels: 'floating',
},
};
I mentioned amount above
This amount is set your code and doesn't pick up from the price
Can you log the unit amount in the console and share the value?
No valid payment method types for this configuration. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and invoice settings (https://dashboard.stripe.com/settings/billing/invoice) and that the amount (2499) is not lower than the currency (inr) minimum: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts.
The error showed that you set 24.99 INR in the request. Your account country is CA, so it will use the minimum amount of 0.50 CAD. 24.99 INR = 0.41 CAD which is below the minimum
ok gotcha. let me check on my end, if we are indeed setting StripeElementOptions.amount to 2499 inr then yeah I guess thats the problem. Would be nice if the error mentioned that
ah I see the error does include that.. I think our system (sentry) truncated the error unfortunately.
is that unhandled promise rejection unrelated?
thx, yeah I confirmed we're setting the value of 2499 which must be a bug on our end