#bryanoltman-bryan-oltman_docs
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/1268298537553104947
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Is the checkout page in question
Hello
Hello!
Hmm the tiered approach should work best here for what you are looking for
I think it's functionally correct, it just generates really noisy and confusing invoices/checkout pages
Yeah no way around that really -- if you want deeper customization on the actual checkout page then you need to build a custom checkout flow.
๐ฆ
Question about the invoice that gets generated: why are the quantities next to "code push" listed as 0?
Because this is the initial Invoice for a metered Subscription
Metered billing is backward facing
I'm not sure I follow
You are using Usage-based billing, that means it is "post-billed" and you record usage over the course of a period and then bill for that usage at the end of the period
Right
And I've recorded 610000 units
Which is correctly split into 50k and 560k
Is that screenshot for a preview of an upcoming Invoice? Did you generate that usage during the actual billing period?
You can't generate usage for the initial Invoice of a Subscription...
That's not really possible
As the billing period hasn't actually started yet
Is that screenshot for a preview of an upcoming Invoice?
Yes
Did you generate that usage during the actual billing period?
Also yes (I recorded the metered events today)
Okay can you share the Subscription ID?
Yep, looking
Oh the second line item isn't metered
That Price (price_1NzOkSHSA9cXarIcvNNb31Ou) is not a Usage-based Price
Right, we want a flat fee for the first 50k and then per-unit pricing after that
The guide I'm following says to do this:
Yep so you have to set the quantity on that
Looking
Okay let's pause a second, why are you using a tiered Price for the flat fee?
We had that in place already. I assumed it would work as a flat fee price if I specified a quantity. Is that not the case?
You want just a standard flat rate Price to represent the flat fee where you would just set the quantity to 1
Then you have a second Price that handles the tiered usage
Maybe that is also why you are seeing extra noise on the UI and Invoices
Let me give that a try real quick
Try changing that tiered Price to just be a simple flat rate Price for $20
That cleans up the checkout page a bit!
Yeah that looks more like what I'd expect
Is the title of the line item always the product name?
Yes
You can use description to add extra info below
Err actually I might be misremembering that
Not sure we do display description on Checkout
Nvm I was right
We do
Helped a bit with the invoice too, although the "0" quantity next to the metered plan is odd
Just to confirm, there's not a way to roll these into a single price? i.e., make the flat fee part of the first item $20 while still charging that $20 at checkout?
No that's not possible with Metered Prices unfortunately.
Product description
Not Price
The Price is supposed to just represent the amount and interval really
You want to set a description on the Product and that will show in the UI if you so desire
Ah, so that will show the same thing on every line
Not sure that helps us, but good to know
I mean you could always use different Products here if you so desire
That would allow you to customize further
That might be the move
Still some weirdness in presentation I think (our customers will probably expect to see a single subscription vs "code push and 1 more")
Moving past that for now, this will all bill at the end of the billing period? i.e., both the flat fee and the metered charges?
Yes
You can use test clocks to test: https://docs.stripe.com/billing/testing/test-clocks