I want to pre-authorize stripe payments as described here:
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=checkout#auth-and-capture
or here
https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
I would prefer to use Stripe checkout (the first link).
After that, maybe after correcting prices, I woulds like to create a stripe invoice (https://docs.stripe.com/invoicing) using the previously created PaymentIntent with previously held funds (but according to the documentation, an invoice creates its own PaymentIntent).
Is it possible?
It is described in the links above how to pre-authorize and then capture the funds. But instead if just capturing, I want to create a stripe invoice so that the customer can pay it.
Using post-payment invoices (https://support.stripe.com/questions/pricing-for-post-payment-invoices-for-one-time-purchases-via-checkout-and-payment-links) is not an option.
What you're describing (creating an Invoice for a Payment Intent at capture time) isn't possible with Stripe.
The closest you could get is cancelling the Payment Intent with the held funds and separately creating an Invoice yourself that is sent to your customer to complete payment. This can sometimes be confusing for customers since held funds aren't always released immediately by the bank.
Alternatively, you could continue with capturing the Payment Intent for the amount you want and then separately create an Invoice that you can mark as paid_out_of_band
(see https://docs.stripe.com/api/invoices/pay).