#salim-bt_ece-errors

1 messages ยท Page 1 of 1 (latest)

wheat treeBOT
#

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

๐Ÿ“ 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.

fiery anchor
#

to use*

velvet crest
fiery anchor
#

thanks , i have Q
This means that the frontend indicates the cost for payment. This means that the user can change the cost through the console. This means that I can get less than necessary on the backend.

#

and
What will happen if the user paid, but the frontend did not send a request to the backend? Will the payment be lost?

velvet crest
#

What do you mean by that? Can you provide more details here?

fiery anchor
#

the front creates the confirmation token and send it to backend right?

wheat treeBOT
velvet crest
#

The confirmation toke is created on the front-end, sure. What does 'send it to backend right' mean? You can access that information to use it on the server-side call. I do not think I fully understand the question sorry

fiery anchor
#

ok Q The cost calculated by the frontend 100% will not be the same as the backend calculates. The cost is calculated before opening the ui wallet. It's time, cents can change. How will the backend check the correctness of the payment amount?

#

who indicates the cost for payment?

velvet crest
#

Why do you say that the Stripe fees will differ? Or, are you referring to the amount changing on your end?

fiery anchor
#

yes about the amount changing on my end

#

What will happen if the user paid, but the frontend did not send a request to the backend? Will the payment be lost?
If the user closed the tab, the Internet on the phone disappeared etc?

#

Or will the payment not be debited without confirmation on the backend?

fathom dragon
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away. You control the amount of the payment.

For an Express Checkout Element flow, the actual payment is processed when the Payment Intent is confirmed, which is done in Step 7 of the guide my teammate provided.

If your code doesn't reach that point, then no payment is processed.

fiery anchor
#

ok What if this token is stolen? We are talking about the frontend

fathom dragon
#

Nothing as far as I'm aware. Are you seeing something in your testing that is giving you concern that isn't the case?

fiery anchor
#

ok and What will happen in 12 hours?

fathom dragon
#

Huh? What do you mean?

fiery anchor
#

if unused, it expires after 12 hours?

fathom dragon
#

You can test all of this in testmode and see exactly how our system behaves. You can use the test cards listed here to help with that testing:
https://docs.stripe.com/testing

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

fathom dragon
fiery anchor
#

confirmation token

fathom dragon
fiery anchor
#

do this way of confirmation token is beter than client secret?

fathom dragon
#

I don't understand the question. Confirmation Tokens don't remove the need to use client secrets.

The guide my teammate shared shows them needing to be used together:

  const {error: confirmError} = await stripe.confirmPayment({
    clientSecret,
    confirmParams: {
      confirmation_token: confirmationToken.id
    },
  });```
fiery anchor
#

i am trying to create confirmation token, when using express checkout element , i see this

fathom dragon
#

Did you follow our guide?
The error message seems to indicate that you didn't mount the Express Checkout Element, or the Element you're intending to use to collect payment method details.

fiery anchor
#

ok thank can you leave this tikect opened for a while, maybe i will have another Q

fiery anchor
#

express checkout mounted and i still see the error

fathom dragon
#

Can you share your code?

fiery anchor
#

sec

fiery anchor
#

sorry for delay

#

i have other Q

Frontend indicated the cost of $3.00, received a token. The backend when creating the payment intent and using this token specified $2.5. What will happen? I need a detailed answer

fathom dragon
#

Hang on, let's sort out the error message first.

fiery anchor
#

ok

fathom dragon
#

Do you see any errors being thrown when you call .mount()? Or is that completing as expected?

#

What code is running inside of your CREATE_CONFIRMATION_TOKEN() function?

fiery anchor
#

fun, error is gone ahah
i think error was because of mode: 'setup'

fathom dragon
#

I doubt it, the Express Checkout Element supports using a mode of setup just fine.

#

But glad to hear you're past that now.

#

Frontend indicated the cost of $3.00, received a token. The backend when creating the payment intent and using this token specified $2.5. What will happen? I need a detailed answer
What do you see in your testing? If your backend tells us to process a payment of $2.50, we're going to process a payment of $2.50.

fiery anchor
#

ok thx

fathom dragon
#

Sorry, I don't need that if you aren't seeing the error anymore. I didn't realize you'd already gotten past the previously mentioned error when I asked those questions.

fiery anchor
#

ok thank you for your help

#

last Q

#

the confirmation token works with mode of setup?

fathom dragon
#

Yes

fiery anchor
#

i see this error, when:

  • mode: 'setup'
  • if use both: .confirmSetup and token confirmation
#

if disable .confirmSetup and keep only confirmation token + mode: 'setup' - all fine


#

here fine

fathom dragon
#

You need to create the Confirmation Token first, the way we show in the guide

#

Before confirming the intent, which should use the Confirmation Token you just created

fathom dragon
#

Nope, doesn't need to be.

fiery anchor
#

ok thank you so much

#

i wish you good day

fathom dragon
#

Thanks, hope the same for you.

wheat treeBOT