#dharmesh_api

1 messages · Page 1 of 1 (latest)

vivid sageBOT
#

👋 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.

lean pecan
#

👋 Hi there! Let me take a look

lethal jasper
#

ok sure

lean pecan
lethal jasper
#

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

lean pecan
#

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?

lethal jasper
#

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.

lethal jasper
lean pecan
#

Can you share a request ID where you're creating the Checkout Session?

lethal jasper
#

but it wont work

lean pecan
lethal jasper
#

Could this behavior be due to a limitation of Stripe’s embedded mode?

lean pecan
#

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

lethal jasper
#

but as per documentation , we can create multiple prices in 1 product

lean pecan
lethal jasper
#

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?

lean pecan
#

You cannot update the description of a finalised invoice

#

This is not related to embedded Checkout mode

lethal jasper
#

So can we make changes before the invoice is finalized? If we target invoice.finalized, will it be possible or not?

lethal jasper
lean pecan
#

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

lethal jasper
#

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

vivid sageBOT
lethal jasper
#

any updates ??

glass depot
lethal jasper
glass depot
#

Yeah but that won't work with Checkout as they're ~immediately finalized

lethal jasper
#

so what i need to do ?

#

this is my question

#

we already in production

glass depot
#

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

lethal jasper
#

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?

glass depot
#

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)

#

Sounds like you've done everything under one product

lethal jasper
glass depot
#

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

lethal jasper
#

Since we are already in production, do we need to move to a one-product-one-price architecture?

glass depot
#

That is our recommendation yes, just like it was last week

glass depot
#

I thought I spoke to you last week, maybe not

lethal jasper
#

no