#guzonja23
1 messages · Page 1 of 1 (latest)
Where possible we'd suggest using Checkout. Note Checkout can also be configured to generate a one-off post-payment invoice for one-time payments too (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-invoice_creation) if that helps.
Is it possible to use checkout session out side of the Checkout hosted page? How would I capture payment from checkout session outside of the hosted checkout page that Stripe offers?
no, that's not a thing
I tried to integrate Checkout hosted page but that's just not possible with requirements that I have. What would be your other suggestion for my problem?
if you need something entirely custom then using a one off Invoice, passing all the information you collected like shipping address etc so that our automatic tax applies; and then confirming the Invoice's PaymentIntent on your own custom page using Elements (your first option you described) is best
the draft invoices are just something you'll have to ignore. You can call https://stripe.com/docs/api/invoices/delete if they are not finalized yet
Okay, this helps a lot because it feels like overengineered solution. To prevent auto collection of the draft invoice I should set auto_advance flag to false and that's it? I don't want to charge custoemr after they have left the checkout page
well your use case would have been what our Orders API was intended for (https://stripe.com/docs/orders) but that was deprioritised and no longer exists, the recommendation is to use Checkout
if auto_advance is false and you never confirm the PaymentIntent yourself or call the Invoice Pay endpoint then its' fine and they won't be charged