#morunas-price-deletion

1 messages Β· Page 1 of 1 (latest)

potent forge
lucid jewel
#

Ahh important resource, I was only checking the Product API πŸ™‚

#

I'm just mapping the lifecycle from our end of things for our products in relation to Stripe. But it seems the correct way will be if a product is removed (no longer available for purchase), it will be marked as active:false, so that existing subscriptions may continue.

#

Will a Subscription with a subscription item with a price linked to an active:false Product renew as normal? I would assume yes, but just to confirm.

potent forge
#

Yep, any active subscriptions with a now archived price/product will continue to function as expected

lucid jewel
#

Perfect πŸ™‚

#

this is gonna be great ^^ lots of flexibility

potent forge
#

The archiving just means it can't be used for any new subscriptions/purchases

lucid jewel
#

if I have another question on a separate topic, can I post it here? or should I post it separately on dev-help? (I'm guessing the latter)

stark heart
#

Either works

lucid jewel
#

Alright. So yesterday I confirmed with devs here that in a model where a customer can go from multiple subscriptions on individual products to a single subscription that gives access to all products, the proration mechanic wouldn't work, since that relates to changing a single subscription. So for that I would need to calculate the crediting for each subscription individually, and then credit that to the customer while creating the new "big" subscription. Assuming that all stands and I understood it correctly, my question is twofold:

  • What is the best method for crediting that amount? Is it a discount?
  • And how to customize what will appear on the invoice? (when using proration, lines are automatically added for "time left on X subscription")
stark heart
#

Hm, bear with me a moment while I think through that.

#

I'm thinking Invoice Items will be the best way to closely emulate how prorations normally appear on an invoice, but am running a quick test to ensure they get swept into the new invoice when a subscription is modified.

lucid jewel
#

but the thing is I wouldn't modify a subscription right? I would cancel all the "small" subscriptions immediately (so cancel_at_period_end false) and then create a new subscription, create the first invoice, add the crediting invoice items, attempt to charge it?

stark heart
#

Oh gotcha, I was assuming you'd keep one subscription to add the other items, but your approach of creating a fresh subscription would be cleaner.

lucid jewel
#

just didn't know what would be a best approach on the crediting...

#

so what I should do is simply create invoice items for each cancelled subscription, with appropriate description, without a Price and just negative amounts, and then add them to that first invoice

#

and I guess if - though VERY unlikely - the crediting is higher then the new subscription price... the client will just have that credited on their account for future use/renewals, correct?

grizzled delta
#

hey there, stepping in for @stark heart who needs to step away

lucid jewel
#

hey hey πŸ™‚ no worries, not in a hurry :- )

stark heart
#

I don't recall off the top of my head what happens with this flow if the total amount for an invoice is negative, but I would suggest trying to use Invoice Items for the credit. You can specify a negative amount for them (to serve as a credit) and provide a description to be shown on the invoice.

#

Sorry, I do need to run now, but @grizzled delta can help out. πŸ‘‹

lucid jewel
#

cheers @stark heart ! thanks for the help πŸ™‚

#

@grizzled delta the only question pending was really: what happens to an invoice if I add negative amounts that surpass the invoice amount? (so a negative total)

#

it's a farfetched scenario... probably will never happen. but still need it covered

grizzled delta
#

Is it necessary for your business to have a combined invoice including prorations for the transition period? Do all the small subscriptions have matching invoice periods?

lucid jewel
grizzled delta
#

If an invoice ends up with a negative amount, this would be credited to the customer balance and applied against future invoices. This is fairly normal if, for example, you "downgrade" from a paid annual subscription to monthly.

lucid jewel
#

we are already using the normal single subscription model, but we are going to introduce these smaller multiple subscriptions optionally for customers who don't want to commit big from the get go. and indeed when downgrading they are credited for future use. Just needed to confirm that's what would happen if I add invoice lines with negative amounts ending up in a negative invoice. Super! All questions answered πŸ™‚ cheers!

grizzled delta
#

NP - happy to help πŸ™‚