#morteza_api
1 messages ยท Page 1 of 1 (latest)
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.
- morteza_issuing-spendinglimits, 18 hours ago, 45 messages
๐ 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/1230117851726352445
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is the JS SDK, yes?
yes
Are you sure clientSecret is not falsy?
yes
it's wired it happens for some our website and codebase is exactly the same
we are debugging and made sure cleint secret isn't null
You're going to need to provide me with more code and the full error
the error is an object with 2 keys
error: {
code: "reader_error",
message: "Payment intent ID cannot be null"
}
any news ?
ok
Also, I'm helping other users too so please be patient. Thanks
lemme send
payment intent id : pi_3P6Wv6FUe5e27jE11vhw5BA9
client_secret: pi_3P6Wv6FUe5e27jE11vhw5BA9_secret_C27mbBmLtDGXYpmH5yE5GsWyj
and here is the source code which was working in production
Are you sure it's the collectPaymentMethod function that is throwing?
Your code is hard to grok
yes we are sure that this function is throwing the error
I checked the docs, and yes calling await terminal.collectPaymentMethod(clientSecret) should just work. can you log the clientSecret just before passing it to the function to make sure it's correct set?
we have already done that
as you see in the code there's a console logging client_secret
and as I said in the beginning, we have this issue for some of our websites, don't know if it might be the reader or what
and this exact code was working previously? or you made some changes?
can you share a PaymentIntent ID (pi_xxx) where the same code worked?
your function call looks correct (terminal.collectPaymentMethod(clientSecret)), and the two PaymentIntent you shared looks identical to me. So I don't really understand why one would work and not the other (assuming you are using the exact same code).
I would recommend to ask your question to Stripe support, since they'll be able to spend more time to investigate this: https://support.stripe.com/contact
make sure to include all relevant information (object IDs, code, error message, etc.)
ook