#brittany-invoice-payment
1 messages · Page 1 of 1 (latest)
brittany-invoice-payment
You create an Invoice, then you add line items, then you finalize the Invoice then you pay the Invoice. That's how it works. You don't "attach a charge" to an Invoice
Ok. Thanks. I'll try that
Hey, I'm a dev on this with Brittany. We tried to create an invoice but got an error that it required a invoice line item.
So we create the invoice line item, and are looking to attach this to the invoice.
Does this make sense?
hello! You're likely on an old API version so you have to pass https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior explicitly on Invoice creation to allow creating an empty draft Invoice
or use a more recent API version https://stripe.com/docs/upgrades#2022-08-01
Gotchya - we'll include the pending_invoice_items_behavior=exclude.
Once this has been created, we should get an invoice id.
Now that we have an invoice id we will create the invoice line item. THEN, we will add the invoice line item to the invoice, correct? Is there a parameter that allows us to do this?
https://stripe.com/docs/api/invoiceitems/create + invoice: 'in_123' is how you add a line item to an Invoice
@lethal otter does that make sense?
This does. Thank you very much!