#dharmesh_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/1440270207330418700
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
👋 Hi there! Let me take a look
ok sure
Yes, the nickname is not shown to customers: https://docs.stripe.com/api/prices/create#create_price-nickname
this is the invoice
if you see here , its showing product name instead of price nicknames
My implementation uses one product with four different prices.
which are recurring
Setting a description on a line item will show on the invoice
But I'm not sure whether this also works when using subscriptions
Are you creating a Subscription for these recurring prices?
yes
like 1 product(The real feel company) is there and 4 prices(basic, pro, standard and addon)
i want this names
I checked on ChatGPT , when a product has multiple prices and we use Stripe Checkout in embedded mode, the invoice always displays the product name — not the price name. Stripe doesn’t allow overriding this in embedded mode. So if we want the invoice to show the actual plan name, we need to create separate products for each plan/price.
Yes
I’ve verified the implementation, but it is still not working as expected.
Can you share a request ID where you're creating the Checkout Session?
after subscription creation, i havenupdated the invoice items
const subscriptionItemUpdateResponse = await stripe.subscriptionItems.update(item.id, {
metadata: {
display_name: displayName
}
});
but it wont work
could you confirm this ?
Yeah, it looks like when using Checkout Sessions that each line item uses the product.description: https://docs.stripe.com/payments/checkout/migrating-prices#mapping-table-server-one-time
Could this behavior be due to a limitation of Stripe’s embedded mode?
It's not related to embedded mode, but it's how Checkout Sessions work
Typically different plans like Basic/Pro should be modelled as separate Product objects
but as per documentation , we can create multiple prices in 1 product
Yes you can, but different tiers should be modelled as separate Products: https://docs.stripe.com/products-prices/pricing-models#flat-rate
My question is simple: since our product is already live, are we still able to update the invoice description? It appears this may be a limitation of the embedded mode, correct?
You cannot update the description of a finalised invoice
This is not related to embedded Checkout mode
So can we make changes before the invoice is finalized? If we target invoice.finalized, will it be possible or not?
ok
Yes, you can update an invoice before it is finalised. You would have to listen for invoice.created as invoice.finalized is already too late
If I generate the checkout session and later need to update the invoice description, which specific Stripe webhook event should I target?
can you provide me which API or method i need to call
any updates ??
I think we already answered that question, right?
If I proceed with this approach, it should work as expected, correct?
Yeah but that won't work with Checkout as they're ~immediately finalized
inside invoice.created which methos i need to call
so what i need to do ?
this is my question
we already in production
Well, normally you'd call the update invoice endpoint
But, as stated, it likely won't work as the invoice will be immediately finalized by the time you receive the .created event
I’m still unclear about the next steps. Since embedded mode doesn’t allow invoice customization with a single product containing multiple prices, what should be the alternative approach?
To resolve this issue, do I need to restructure the setup?
I think we spoke about this the last time right? You'd generally model each 'plan' (e.g. Basic, Pro) in your app as a product in Stripe and then each of those products would have a price for each internal (e.g. yearly, monthly)
See the image here: https://docs.stripe.com/products-prices/pricing-models#flat-rate
Sounds like you've done everything under one product
exactly
Yeah then that explains the issues you're having with the invocie lines as they use the product details as we've explained
You're going to need to model it differently, like above
Since we are already in production, do we need to move to a one-product-one-price architecture?
That is our recommendation yes, just like it was last week
what
I thought I spoke to you last week, maybe not
no