#Louie-invoice
1 messages · Page 1 of 1 (latest)
👋 Happy to help
To include invoice items, you'll need to create the invoice items on the customer first, then create an invoice:
https://stripe.com/docs/invoicing/integration#create-invoice-code
I see the invoice item is automatedly embedded into the invoice item but how do it know which invoice to embed?
it'll be added to the next invoice created
If invoice [0] parameter is included in the Invoice Item Create API, it'll be added to the corresponding invoice ID; otherwise, it'll be added to the next invoice
[0] https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-invoice
i see
@sleek flame Let's use the thread here
hi river
I have a question about the how to designate a payment method to that Invoice object for automatic charging?
Do you mean that the invoice will be charged to the customer's default payment method?
Yes this is my question
The steps will be:
- Create a Customer: https://stripe.com/docs/api/customers/create
- Create a Payment Method and attach to Customer: https://stripe.com/docs/payments/save-and-reuse
- Add the Payment Method to Customer's default payment method for invoice setting: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
- Set
collection_method=charge_automaticallywhen creating an invoice: https://stripe.com/docs/api/invoices/create#create_invoice-collection_method
i see thank you