#blede_subscription-lifetime

1 messages ¡ Page 1 of 1 (latest)

olive tulipBOT
#

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

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

scenic tinsel
honest carbon
#

Hmm I don't think you can use both parameters at the same time

#

did that work?

scenic tinsel
#

Nope

#

same issue

#

I think my only choice is to preview the invoices with the customer details without providing a customer_id

honest carbon
#

mm I see.
taking a step back, what are you trying to do with preview?

Are you trying to show what the proration would look like?

scenic tinsel
#
  • if they use a promotion code later on
#

I know proration wouldn't work because the recurring vs single charge logic doesn't work like that.
But I also rely on the preview endpoint to check how taxes apply for a customer

olive tulipBOT
formal gazelle
#

blede_subscription-lifetime

#

Would you switch them immediately to lifetime? If so you could switch to a "free Price" like a monthly Price first with an extra InvoiceItem for the one-time lifetime fee

scenic tinsel
#

So you mean in the preview request, preview them going to a free price id, with the added one time fee?
Wouldn't that throw the same error that an invoice_item cannot be used at the same time as the subscription_details?

formal gazelle
#

You wouldn't cancel for real since you're switching them to a say $0/month Price. That would immediately prorate + charge the extra fee. And you can cancel after that.
A bit of a hack but I think it could work

scenic tinsel
#

But that would mean I have to create 2 different invoices right?

formal gazelle
#

You would have a first Invoice switching them to the lifetime Price (one-off InvoiceItem) + a fake $0/month fee + proration for the current Price.
And then you cancel which doesn't need an Invoice since there's nothing to pay at that point

scenic tinsel
#

Right, I was able to get what I wanted just using the customer_details instead of the customer_id.
I'll try this approach If I get more time at work!

Thanks for the help and sorry for the trouble!