#josula_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1420426128388264068
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Do you have an example invoice id where you DO see company name and one where you don't so I can compare the 2 and investigate what's going on here?
That is the thing: Where would we even add the company name? On the customer level or invoice level?
our flow is usually: someone orders, we create a stripe customer, then create the invoice and attach the customer to it
but for some reason we do not pass a company to stripe
and I cannot find in the docs where I would pass it
Oh I thought you meant you used to see company name and now no longer do
const invoice = await stripe.invoices.create({
customer: stripeCustomer.id,
Thats how we then create the invoice
but i cant seem to add a company key anywhere
that would be shown on top of the invoice
slightly confused
Or wait: Would I just set the company name INSTEAD of the customers name in the name field?
name: ${cart.billing_address?.first_name} ${cart.billing_address?.last_name },
So basically up there?
mhmm that seems weird and not clean
name
string
The customer’s full name or business name.
Well => what if I need both?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so I want
John Doe```
on the invoice
I mean I could do something like this but that is ridiculous:
name: `${
cart.billing_address?.company
? `${cart.billing_address.company} | `
: ""
}${cart.billing_address?.first_name} ${
cart.billing_address?.last_name}`,
Ah ok so the customer is representing a company and you want that on the Invoice. The customer object does not have a field for a company, so you'd have to do your approach or use something like custom fields to display it: https://docs.stripe.com/api/invoices/create#create_invoice-custom_fields