#Randomuser2022
1 messages ยท Page 1 of 1 (latest)
i check there's a Declined payments section, but it has a prompt no sure it's the situation I need
we have a page and use payment element instead of check-out session. so we need to call the retravial api to get the payment result to the customer on the page. so i'm testing.
when i enter a invalid card number in test mode, it only has a prompt
like this
i'd like to know how to test a failed payment in test mode.
I don't know where is this alert coming from, it's not from Payment Element.
Could you please share the code where you integrate it?
the payment intent id is: pi_3NDjj0EydrSRkIrF1axEWpr0
sure hold on
the pop up is from our end
I am not sure what's your challenge here. Could you please give more detail?
we'd like to test to complete the payment but the payment is failed. The case i give you is the payment hasn't completed. We need to test payment completion, but the deduction failed, so it'll call payment Intent retrieval API and display the failure payment status to the customer.
the pop up is on the check out page, i can't test submit
I see, you want the authorization to go through but the payment to fail eventually?
The thing is i want to test the Intent retrieval API, but with the stripe document didn't explain this. I try entering an invalid card, it has an error pop-up, so i still stay on the check-out page, and only when the payment has completed, it'll call Intent retrieval API and display the payment stauts, be it successful or failed. Suceessful payment is easy to test. And the pop-up is ok, but i'd like to know a way to test the payment failure.
not really sure about the authorization thing. we'll looking for a situation where after the customer submitted his card info, it failed to deduct the money.
ok maybe a litte background info would help
that's the question we had today and now we finish the job. only need to test the Intent retrieval API and the returl_url
Are you only using card?
no, we have affirm google pay & apple pay
but we prefer to test card & affirm cuz for the rest i don't have access
Try using cards that require 3DSecure and then click to fail the authentication: https://stripe.com/docs/testing#authentication-and-setup
Yes
Try the last one, "Insufficient funds".
But actually due to how cards work, you receive the result immediately, so it will not take you to the redirect page if the payment doesn't go through.
so card is impossible to test?
It will just fail immediately on the Payment Element.
The only other option is processing if you use bank transfers.
Sorry, I wasn't clear. The only other state that you might get is processing, and it's only if you use bank transfers as your payment method type.
Basically card payments will always succeed if you get through your authorization.
it doesn't matter for the state. i'd like to test the Intent retrieval API and the returl_url
ok
๐ซ so no way to test?
Sorry, I am not sure I understand what you mean by "Intent retrieval API and the return_url".
Could you please share the code that you want to test?
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yes we would like to have a test in test enviroment
here's the background info
that's the question we had today and now we finish the job. only need to test the Intent retrieval API and the returl_url
The thing is i want to test the Intent retrieval API, but with the stripe document didn't explain this. I try entering an invalid card, it has an error pop-up, so i still stay on the check-out page, and only when the payment has completed, it'll call Intent retrieval API and display the payment stauts, be it successful or failed. Suceessful payment is easy to test. And the pop-up is ok, but i'd like to know a way to test the payment failure.
if a payment fails you will not be redirected
ooooh for every payment methods?
no for cards
we want to test other methods as well, google pay, apple pay, affirm
yes you can test these as well
and we'd like to know how.... according to the stripe document we can't find solutions
this. it's card test, according to you, the card didn't redirect
so test in code not from the page?
and how to test a google pay collection failure?
yes this is because Affirm is a Redirect PM
you need to get redirected to the Affirm website to complete the payment
so even in test mode, i still need to input a valid phone number?
like a valid account?
it looks like requesting a valid phone number
I'm not really familiar with affirm, to be honest
if you need a specific help with this PM type you can reach out to https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support center 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.
ok thanks dude