#pookle_checkout-lineitems

1 messages ยท Page 1 of 1 (latest)

lament escarpBOT
#

๐Ÿ‘‹ 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/1303471460752556072

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

kind obsidianBOT
warped saffron
lament escarpBOT
wooden haven
#

pookle_checkout-lineitems

soft whale
#

Iโ€™ll get it in just a moment

wooden haven
#

If you can share your code too I can likely spot the issue.

My guess is that you have a bug in the code so our API returns a clear error but you aren't properly catching/handling the error and you end up with the Javascript code crashing instead of redirecting possibly. Make sure to read https://docs.stripe.com/error-handling too

soft whale
wooden haven
#

Okay that helps a bit but not enough. We need the exact error you get server-side. The client-side code is crashing because your server is crashing right now

soft whale
wooden haven
#

Perfect! So now you have the exact error which tells you exactly what the issue is ๐Ÿ™‚

soft whale
#

oh so I cannot have a montly and a annual checkout

wooden haven
#

So first your code needs to be fixed to properly catch all errors. That's what https://docs.stripe.com/error-handling explains how to do in details. You need to make sure you handle errors, log them to a file and then return a clear error to your client-side code so that it displays it instead of crashing

And then yes correct we don't support mixing up billing cycles right now. It's something we want to do in the future but today it's not possible

soft whale
#

So our goal is to provide an option to members to pay monthly BUT we will need to collect an upfront amount from them to cover initial costs

#

Is that possible and how would you recommend doing that?

wooden haven
#

So you want for example $10/month but also an extra $100 on the first Invoice for example?

soft whale
#

exactly

#

but we would also like the $100 to be annually paid

wooden haven
#

Gotcha, unfortunately that's mostly impossible today. There are "hacks" but you can't easily make that work with Checkout at all

#

For example you can add an extra $100 one-off Price to the line items and the first Invoice will be for $100 + $10 for example. But the UI won't clearly say the $100 is recurring yearly

soft whale
#

will the $100 be billed annually still or would that have to be done manually every year?

wooden haven
#

This is possible with code, but isn't compatible with Checkout. Knowing that, are you willing to rebuild your integration to not use Checkout at all? Or is it easier to change your business model/approach?

soft whale
#

not at this point. A little bit late as we plan to launch in the coming weeks. What would i have to rebuild or what would I need to change

wooden haven
#

You can't use Checkout for this because Checkout can't show that the $100 is recurring yearly.

So you'd have to use PaymentElement instead which is a different mode of integration for collecting card payments.

Assuming you rebuild that way, then you control the UI showing the amount. So you can show that it's $10/month and an extra $100/year.
and then you can write custom logic to add $100 as a one-off Price once a year. So on the Subscription creation so the first Invoice is for $110, and then each month you get a new Invoice, you "count" what month you're in, and in 12 months when you get the 13th Invoice for the next year your code will add the extra $100 line item again, and you do this each year.
You don't do this "manually", but you write custom code to do this for you end to end

soft whale
#

okay thank you

#

is there a timeline on multiple payment cycles in the same cart?

wooden haven
soft whale
#

thank you for your help!