#ali-osaid_api
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/1278310686044192779
๐ 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.
- ali-osaid_api, 1 day ago, 11 messages
- ali-osaid_api, 1 day ago, 13 messages
after using stripe sdk method confirmPaymentIntent the intent already been confirm so i cant be confirm again
Seems expoected assuming the confirmation attempt succeeds โ intent will transition to a terminal state
What specifically are you trying to do? An example API request would be useful
the problem is the status is still succussed even after using card that process failed
Looks like you want to do server-side confirmation after the user selects their Google Pay card and you call confirmPaymentIntent?
yesss
Do you have an example pi_xxx ID where this happens? If the card fails the intent would not transition to succeeded
Then you need to set confirmation_method: 'manual' on your intent
while creating the payment intent ? right
okay thanks i hope this works
pi_3PsjddAS0IcxtTCe0alqGT0J
btw this is the id can you check
What am I checking?
we used google test card that said proccessing failed but when we checked it still said status success
Yeah you can't use Google test cards
You need to test with real cards in your Google Pay wallet, and we'll substitute them at the time of payment for a test token
but when we were using stripe card it said you cant attach this payment method try different payment methods
An example of this error please
As I said, a real card needs to be added. Not our test cards
even in test env ?
Yes, and we'll automatically switch to a test token when using your test key
okayyy got it thanks
Yeah I mean overall confirmation_method param is probably redundant is the issue was you just using the wrong test cards in Google Pay. Remove it
hi! I'm taking over this thread.
can you share the new PaymentIntent ID with this issue?
I think the error is pretty clear:
This PaymentIntent pi_3PskmIAS0IcxtTCe3slwuypn cannot be confirmed using your publishable key because its
confirmation_methodis set tomanual. Please use your secret key instead, or create a PaymentIntent withconfirmation_methodset toautomatic
but thats the problem im using secret key to confirm the payment and on react native we are using stripe sdk for google pay
this is frontend code
this request comes from your frontend code using your publishable API key: https://dashboard.stripe.com/test/logs/req_dYRhvlzCbQWMmw
so you have two options:
- Change how you create the PaymentIntent to use
confirmation_method:automatic - Or confirm the PaymentIntent from the backend
i already have an api to confirm payment but it gets error before that while using confirmPlatformPayment
in the PaymentIntent you shared, this is what I see:
- create the PaymentIntent on the backend with
confirmation_method: "manual"https://dashboard.stripe.com/test/logs/req_w86USHiAt56x0z - try to confirm the PaymentIntent on the frontend (with a publishable key), which is not possible since you used
confirmation_method: "manual"so it returns an error https://admin.corp.stripe.com/request-log/req_dYRhvlzCbQWMmw
the doc here is pretty clear: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirmation_method
manual: All payment attempts must be made using a secret key.
can you suggest other method of stripe sdk to make google pay but not confirm it because we have to confirm on backend
you can use createPlatformPayPaymentMethod instead of confirmPlatformPayPayment , and then send the resulting PaymentMethod to the backend and confirm the PaymentIntent with it.
thanks will try it out