#Louie-invoice

1 messages · Page 1 of 1 (latest)

sharp spindle
#

👋 Happy to help

sleek flame
#

I see the invoice item is automatedly embedded into the invoice item but how do it know which invoice to embed?

sharp spindle
#

it'll be added to the next invoice created

sleek flame
#

i see

sharp spindle
#

@sleek flame Let's use the thread here

sleek flame
#

hi river

#

I have a question about the how to designate a payment method to that Invoice object for automatic charging?

sharp spindle
#

Do you mean that the invoice will be charged to the customer's default payment method?

sleek flame
#

Yes this is my question

sharp spindle
#

The steps will be:

  1. Create a Customer: https://stripe.com/docs/api/customers/create
  2. Create a Payment Method and attach to Customer: https://stripe.com/docs/payments/save-and-reuse
  3. 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
  4. Set collection_method=charge_automatically when creating an invoice: https://stripe.com/docs/api/invoices/create#create_invoice-collection_method
sleek flame
#

i see thank you