#john_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/1389434728813428736
๐ 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.
- john_api, 6 hours ago, 16 messages
Hi! If you plan to use embedded checkout then you will require the client secret: https://docs.stripe.com/payments/checkout/save-and-reuse?payment-ui=embedded-form
Can I check what are you referring to with sessionID?
Noted! So you don't need the client secret. You can see the steps here: https://docs.stripe.com/payments/checkout/save-and-reuse?payment-ui=stripe-hosted
thanks @void axle
I went thru that but still not clear if URL will suffice.
also, this link will be sent to the customer via email. How do we get the payment method after the customer goes through? Is there webhook that we can listen to?
I see 'checkout.session.completed' webhook event.
I am unsure what do you mean by if URL will suffice. You can listen for a few events such as: payment_method.attached, setup_intent.succeeded. These provide you with the payment method ID (starts with pm) and the customer ID (starts with cus_).
I meant URL in the checkout session.
can we send the URL in the checkout session to the customers so that they can add bank account?
or is there any else that we need to send?
Got it! Yes, you can just send the URL to the customet and they can provide their payment method details.
I would suggest creating a test Checkout Session and going through the flow. This will give you a better idea on how this works.
yes, will do.
and for the webhook, will 'checkout.session.completed' be good?
this will get the 'SessionID' that I can use to retrieve the payment method and attach that to the Customer.
Is that right approach?
Yes checkout.session.completed is the correct event.
- You can use the event to get the Checkout Session ID (cs) to retrieve the Checkout Session.
- From there you can use the Setup Intent ID to retrieve the setup intent object (seti).
- And then you can retrieve payment method object from the Setup Intent object.
https://docs.stripe.com/payments/checkout/save-and-reuse?payment-ui=stripe-hosted#retrieve-checkout-session โ https://docs.stripe.com/payments/checkout/save-and-reuse?payment-ui=stripe-hosted
thank you!
lastly, because this is done via email - what value should I add for the successURL & redirectURL?
I don't see a redirectURL. Are you referring to the return_url?
If yes, return_url can only be used if ui_mode is embedded or custom.
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-return_url
For success_url you should pass a URL to which Stripe should send customers when payment or setup is complete.
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-return_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.