#yosuf_api

1 messages ¡ Page 1 of 1 (latest)

cold swallowBOT
#

👋 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/1283959754401517603

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

snow tree
#

You would want to have 1 Price object, defining this fixed fee + overage model. See the API example in that Doc!

earnest flare
#

Is that possible?

Both the API and Dashboard example specify creating 2 Prices: one for the flat fee, one for the overage. And then including both Prices when creating the subscription which makes sense.

However, I don't want to create the Subscription directly, I want to create a Checkout Session so when the user checks out, both prices are factored in their new Subscription.

snow tree
#

Ah I see hmm

#

Try it!

earnest flare
#

This seems like it would theoretically work. I've managed to create a single meter price with a flat tier and a per unit tier in the Dashboard.

I'm not coding at the moment as I wanted to know if it's possible before spending time developing.

I'm using Payment Links in the Dashboard to check if this would work and to see a preview of the Checkout page.

When I go to create a Payment Link, the Meter price that I created above does not sure up as a Product I can select.

Is it possible to use Usage based tiers in Payment links?

snow tree
#

Yes it's not supported