#koks_code
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/1391963215382057064
๐ 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.
Hi! I need help in understanding your flow better. Can you explain to me your end to end flow on what you are trying to achieve?
sure
- I need to collect Google Pay details from customer for future use purposes.
- On click of a button, I show customer Google Pay information usingExpress Checkout Element option.
- Once customer views Google Pay widget info, I let them click a custom button "Submit Request", I would want to generate CustomerId and PaymentMethodId related to that google pay details and store it in backend.
- Show the customer a message, request submitted successfully.
This is what i want to perform.
does it help you to have an understanding?
You mentioned you are using Express Checkout Element. So your customer will be seeing the Google Pay button like how it shows in our demo: https://docs.stripe.com/elements/express-checkout-element#try-demo. Is this the button you are referring to in Step 2?
How does your step 3 work? You want to add a custom button on this panel in the screenshot?
i can't control this page as it is stripe controlled. I need your suggestion here, as how generally other customers handle it?
Question: Do i need to even show step 3 screen like the one which you mentioned above OR should i simply give a message request submitted successfully. This is not going to deduct any payment so i don't want to show step 3 screen itself.
At this point you are just collecting a payment method to store it to a customer so that you can charge it later correct?
yes you are correct
Give me a moment to look into this.
sure...eagerly waiting
stripe is new to me...not getting the correct approach for last 3-4 days. Appreciate your guidance here
Thanks for waiting! You can refer to this document: https://docs.stripe.com/payments/save-and-reuse
This doc guides you to save a payment method without any payment. However, you need to add an Express Checkout Element instead of Payment Element in this section: https://docs.stripe.com/payments/save-and-reuse#add-the-payment-element-to-your-payment-setup-page
yes, high level i followed this approach
but feel something is missing
This is my backend code
I was able to successfully create setupintent id req_IO5vRx0576caWb
i need guidance on stripe.confirmSetup section where that is not working as expected
should i use payment method or Express checkout element for google pay?
What is the exact issue that you are facing with stripe.confirmSetup?
Can you share your code for how you are confirming the setup intent?
Looking into this.
Here is the updated code
getting this error now
related request Id # req_ATFEEviFyYSm58
Can you remove the payment_method_types parameter from your Setup Intent creation?
And then test if it works?
just did and testing
setupResult {"setupIntent":{"id":"seti_1RiSd4PJyrrClAxyZCYbM2S9","object":"setup_intent","automatic_payment_methods":{"allow_redirects":"always","enabled":true},"cancellation_reason":null,"client_secret":"seti_1RiSd4PJyrrClAxyZCYbM2S9_secret_Sdk7in2slzVagAT1qSPdW0AiP7dFHjP","created":1751946938,"description":null,"last_setup_error":null,"livemode":false,"next_action":null,"payment_method":"pm_1RiSdOPJyrrClAxylNvigh9C","payment_method_configuration_details":{"id":"pmc_1RQtiwPJyrrClAxyMWnCGFPQ","parent":null},"payment_method_types":["card","bancontact","klarna","link"],"status":"succeeded","usage":"off_session"}}
this is the response i got, can i get payment method from this?
Is this payment method id # pm_1RiSdOPJyrrClAxylNvigh9C?
This is the payment method for the Setup Intent seti_1RiSd4PJyrrClAxyZCYbM2S9
can you confirm if this payment method id and along with customer id can be used for future payment and it deducts the amount from the google pay card?
hi @grave gazelle , taking over from my colleague and just caught up. yes pm_1RiSdOPJyrrClAxylNvigh9C is set up for future off session usage
ok