#koks_code

1 messages ยท Page 1 of 1 (latest)

restive heartBOT
#

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

broken roost
#

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?

grave gazelle
#

sure

#
  1. I need to collect Google Pay details from customer for future use purposes.
#
  1. On click of a button, I show customer Google Pay information usingExpress Checkout Element option.
#
  1. 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.
#
  1. Show the customer a message, request submitted successfully.
#

This is what i want to perform.

#

does it help you to have an understanding?

broken roost
grave gazelle
#

Yes, something like this

broken roost
#

How does your step 3 work? You want to add a custom button on this panel in the screenshot?

grave gazelle
#

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.

broken roost
#

At this point you are just collecting a payment method to store it to a customer so that you can charge it later correct?

grave gazelle
#

yes you are correct

broken roost
#

Give me a moment to look into this.

grave gazelle
#

sure...eagerly waiting

#

stripe is new to me...not getting the correct approach for last 3-4 days. Appreciate your guidance here

broken roost
grave gazelle
#

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?

broken roost
#

What is the exact issue that you are facing with stripe.confirmSetup?

grave gazelle
#

let me get it

#

I get this screen and click Pay button now

broken roost
#

Can you share your code for how you are confirming the setup intent?

grave gazelle
#

sure

broken roost
#

Looking into this.

grave gazelle
#

Here is the updated code

#

getting this error now

#

related request Id # req_ATFEEviFyYSm58

broken roost
#

Can you remove the payment_method_types parameter from your Setup Intent creation?

#

And then test if it works?

grave gazelle
#

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?

broken roost
#

This is the payment method for the Setup Intent seti_1RiSd4PJyrrClAxyZCYbM2S9

grave gazelle
#

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?

restive heartBOT
shadow cove
#

hi @grave gazelle , taking over from my colleague and just caught up. yes pm_1RiSdOPJyrrClAxylNvigh9C is set up for future off session usage

grave gazelle
#

ok