#Chhay Toch - Custom invoice
1 messages · Page 1 of 1 (latest)
👋 Thanks for reaching out
It should be displayed in the PDF,
Could you please share an invoiceId ?
Here "in_1LcnXEFR9tqGT3lrBoQNY5JL"
Thanks, I'm checking...
So the invoice was created at 2022-08-31 09:48:36 +0000
and the update of the customer's custom_fieldswas made after, at 2022-08-31 09:48:37 +0000
You need to create another test invoice in order to see the new fields in the pdf
hi
how do you mean by create another test invoice?
when stripe allow us to test invoice in the development mode?
after the first time of the customer subscription, they would receive the invoice PDF via the email, right?
so those custom_fields will include in the invoice?
Actually the issue, is that the update of the customer with the custom_fields was made 1 second after the invoice creation, that's why that invoice doesn't contain those fields
actually, we have a trouble in testing the invoice pdf to have a correct data and format that we want.
yep so you can't set custom fields on the first invoice of a subscription since it's finalised immediately when you call the API to create a subscription.
what you would do instead is set invoice_settings.custom_fields on the Customer object, and then create the subscription. The invoice inherits the fields from the Customer object then. (https://stripe.com/docs/invoicing/customize#custom-field-inheritance)