#mateuszinsys_93238
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- mateuszinsys_93238, 1 day ago, 6 messages
Can i somehow create invoices and then connect payment intent to invoice and then finalize it?
When creating an Invoice a PaymentIntent is created automatically, you can use it for your needs.
ok then i think I know everything, thanks
Happy to help.
But as I am going throught the docs, there is no possibility to create invoice with invoice item. Create Invoice have no items (like in subscription), and even when updating invoice line item we need id of it.
You need to create an Invoice and then create Invoice Items with a reference to the Invoice ID.
ok thanks
But still something is not ok for me, as you wrote: "When creating an Invoice a PaymentIntent is created automatically, you can use it for your needs.", based on docs this is not true because of collection_method, when set to charge_automatically uses default payment method and send_invoice will send it to the user, and we don't want to do it, we want to emped Stripe element into our website
If you don't set auto_advance: true, it will not be sent/charged unless you manually request it: https://stripe.com/docs/api/invoices/create#create_invoice-auto_advance
But still payment intent as you said is not created,
You need to finalize the Invoice.
Ok thanks