#whattrivia-invoice-creation

1 messages · Page 1 of 1 (latest)

cedar slate
#

I'm sorry I don't understand the question and what's blocking you

trim sluice
#

I run events. When an event closes, i create an invoice item. Some customers want to be billed weekly, bi-weekly, or monthly. I have a service that comes through and invoices the pending invoice_items based on that schedule. When it does that, if they have a default credit card on their account, that customer has elected to not be invoiced, they just want to be charged and get a receipt. If they are new, haven't set up a credit card, or some want to manually pay anyway, i want to send them an invoice.

#

so it seems like i have to change the 'collection_method' if they have a card on file or not. I was trying to read their default_source on their customer object and figure it out that way. If they stored a credit card as their default payment method, i do charge_automatically, if not, i do send_invoice

cedar slate
#

I'd recommend using invoice_settings[default_payment_method] on Customer in that case not default_source (deprecated for multiple years). Just be explicit when they attach their payment method details and save it in the settings and then use this to decide how to invoice

#

Does that make sense?

trim sluice
#

awesome. I'll research that. Thanks for the help @cedar slate !