#salim-bt_ece-errors
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/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.
- salim-bt_api, 3 days ago, 12 messages
- salim-bt_api, 3 days ago, 13 messages
- salim-bt_api, 3 days ago, 6 messages
- salim-bt_api, 3 days ago, 7 messages
- salim-bt_api, 5 days ago, 9 messages
to use*
Hi, is this what you're looking for, https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#create-ct ?
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?
What do you mean by that? Can you provide more details here?
the front creates the confirmation token and send it to backend right?
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
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?
Why do you say that the Stripe fees will differ? Or, are you referring to the amount changing on your end?
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?
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.
ok What if this token is stolen? We are talking about the frontend
Nothing as far as I'm aware. Are you seeing something in your testing that is giving you concern that isn't the case?
ok and What will happen in 12 hours?
Huh? What do you mean?
if unused, it expires after 12 hours?
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
If what is unused?
confirmation token
They have an expires_at field on the object that indicates when they expire:
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-expires_at
do this way of confirmation token is beter than client secret?
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
},
});```
i am trying to create confirmation token, when using express checkout element , i see this
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.
ok thank can you leave this tikect opened for a while, maybe i will have another Q
express checkout has been mounted!!
express checkout mounted and i still see the error
Can you share your code?
sec
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
Hang on, let's sort out the error message first.
ok
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?
fun, error is gone ahah
i think error was because of mode: 'setup'
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.
can you gice detailed answer for this?
ok thx
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.
ok thank you for your help
last Q
the confirmation token works with mode of setup?
Yes
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
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
this should done by backend?
Nope, doesn't need to be.
Thanks, hope the same for you.