#morteza_api

1 messages ยท Page 1 of 1 (latest)

tropic lotusBOT
atomic pumiceBOT
#

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.

tropic lotusBOT
#

๐Ÿ‘‹ 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.

atomic pumiceBOT
lyric shard
#

This is the JS SDK, yes?

lean geyser
#

yes

lyric shard
#

Are you sure clientSecret is not falsy?

lean geyser
#

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

lyric shard
#

You're going to need to provide me with more code and the full error

lean geyser
#

the error is an object with 2 keys

error: {

code: "reader_error",
message: "Payment intent ID cannot be null"

}

#

any news ?

lyric shard
#

Can you share some more code as asked?

#

Also the pi_xxx ID

lean geyser
#

ok

lyric shard
#

Also, I'm helping other users too so please be patient. Thanks

lean geyser
#

lemme send

#

payment intent id : pi_3P6Wv6FUe5e27jE11vhw5BA9

client_secret: pi_3P6Wv6FUe5e27jE11vhw5BA9_secret_C27mbBmLtDGXYpmH5yE5GsWyj

and here is the source code which was working in production

lyric shard
#

Are you sure it's the collectPaymentMethod function that is throwing?

#

Your code is hard to grok

lean geyser
#

yes we are sure that this function is throwing the error

somber bay
#

hi! I'm taking over this thread.

#

give me a few minutes to catchup

lean geyser
#

ok

#

thanks

somber bay
#

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?

lean geyser
#

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

somber bay
#

and this exact code was working previously? or you made some changes?

lean geyser
#

yes and even the same code is working for some of our websites

#

now

somber bay
#

can you share a PaymentIntent ID (pi_xxx) where the same code worked?

lean geyser
#

ok lemme find

#

pi_3P3POfLmjdnG8GX00PKjgzgW

#

here you are

somber bay
#

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

lean geyser
#

ook