#frn.btc
1 messages ยท Page 1 of 1 (latest)
Hi there, yes the confirmation page is something that you need to create
Right, but when following the custom payment flow docs, it makes it seem like that's all I need to do.
When should I create a session, and how should I tie that in with the payment intent? Doesn't seem like the documentation ties the two concepts together.
Can you send me the URL to doc that you are following?
If a checkout session is required, then why does this payment flow not mention to create a checkout session?
Thanks btw ๐
Are you sure you are using CheckoutSession? because the doc that you sent is Custom payment flow which doesn't involve checkout session.
Okay, so that is my question, how does checkout session play in with payment intent. Stripe documentation makes it seem like I'll be fit to charge customers without a checkout session, according to this code.
You should follow https://stripe.com/docs/checkout/quickstart for Checkout Session
Right, so if I'm successfully charging customers with payment flow, what benefit is there, or what reason is there, to include checkout session?
your question keeps changing, can you tell me what's the main ask?
i.e., is there a problem that you want to solve, or you are just curious on Checkout Sessions API in general?
I don't understand how checkout session and payment flow relate
Checkout session is simply a payment flow that Stripe offers with prebuilt checkout page.
Okay, so for custom code, do I even need checkout session? It seems I can get it done with just the payment flow code.
Alright, I guess this is getting redundant, I have an additional question that may be easier to answer, if that's ok.
When is the right time to create a Stripe customer? If I create a customer every time they're going to make a purchase, but abandon the process, and that happens for ... 1000 customers, then I'll essentially have 1000 customers that are effectively useless data points. Is that ok? Will I be charged for creating X amount of customers?
No, Stripe doesn't charge you based on the number of customers you have in your account.
You can learn more about pricing here https://stripe.com
Ok, is this the expected way to create customers? Just create them every time they're going to do a payment?
if not existing already of course
I'd recommend you to reuse the customer object so that you can associate future payments with them, it's good for your auditing and easier for you to manage the customer records.
So when you create a checkout session, you can pass in the customer (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer) to associate the checkout session with this customer.
I see, I understand now, it's either you use the custom payment flow, or use a checkout session. I was under the impression that a payment intent is a part of the checkout process.
So you can't create a custom confirmation page using a custom payment flow, unless you set up a customer first.
๐ Taking over this thread, catching up now
Okay, I will use my own user data and and append my own user's userId to the return_url
to create my own fully custom success page
Yes, that will work. Customer will be redirected to your return_url in Checkout Session after completing the payment
sounds good my friend! thank you
No problem! We are happy to help ๐
how do i pass the details of my customer's purchase to my confirmation page?
What details/data are you referring to?
So I implemented custom payment flow following the documentation. Then I use the return_url in the confirmPayment function to get my user to the confirmation page.
When I get to that page, I'm just using the current signed in user's details to display their name, but is there a way to get some information on the payment they just made?
I see that you're using your custom flow. When the customer proceeds to payment, you should save the cart details including items purchased, amount and user name in your own database, then represent it with a cart ID. This cart ID can then set into the return_url which you can retrieve from your database later.
Amazing, makes sense. Just wanted to make sure what was the suggested way to do this thanks!