#thunder-invoice-metadata
1 messages · Page 1 of 1 (latest)
@pastel kindle no, you have to write code to do this by listening for invoice.created events and then set the metadata you need
So will the invoice show the metadata
It will show the metadata if you code explicitly updates that invoice
it won't otherwise
If you are setting the metadata directly on the Subscription, it will appear on the invoice's line items for that subscription.
https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-metadata
If you want the metadata on the Invoice itself so that it shows up on the dashboard , you will need to explicitly set the metadata as koopajah said.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok, so if we add metadata to the subscription it will show that metadata in the invoice line description, but not the actual invoice that is sent to customers?
We have a customer that has 10 different subscriptions, but they need to know how to identify those subscriptions.. So we need to add something to the invoice that says "This subscription is for Store A"
@severe canopy
@narrow stone
Sorry for the delayed response
No worries at all
The metadata would not set the description like that.
Do you have an example ID from a subscription here that I can look at?
I have a customer object that I can show you to explain the issue?
Sure that could be helpful as well
This customer (cus_L79cXQaZvM6clg) is an enterprise account. They have 11 different subscriptions with us. When they get an invoice, it only shows the name of the primary company on all of their invoices.
But they need to know the store that each invoice/subscription is for.
So this is one of their subscriptions (sub_1KotSSCSlBkOK22m1jbBZhMR) and it's for "Store A" (for example)... We need to add "Store A" somewhere on this subscriptions invoice.
Gotcha. I think you will have to explicitly set this with an API call somewhere. Trying to figure out the best place...
Bummer... I feel like a lot of companies would want something like this. Did we maybe design it incorrectly?
I have a feeling that this may be easier to set up than I think and that I am forgetting the field to set it on.
I thought we would be able to update it using the Invoice Templates, but there doesn't seem to be any configuration there that would do this.
You could probably easily set this as the description/memo on the Invoice https://stripe.com/docs/api/invoices/update#update_invoice-description
And you are correct, the template is more for something that will apply to everyone. Customizing each customer's invoice like this is typically done with the API at the moment
Unfortunately I am not seeing this as a setting on the subscription. Right now you might want to do something like set the shop name as metadata on the Subscription and use that to specify the shop name in the memo on the actual Invoice when you get the invoice.created event