Yearly level upgrade - how much and when charged?

I’ve looked a long time at the forum but have not found the answer to this question.

I have yearly recurring membership using S2 member’s Stripe implementation on my website with two possible levels. People start out on level 1 and I want them to upgrade to level 2. I can’t find out … WHEN do the upgrades get charged to the member? Does the plugin take into account how much of the existing membership is “used”? Does it charge the full amount immediately? Does it charge the new amount when the original subscription ends?

Basically, what happens with payments on upgrade?

Thanks!

Hi Tim.

In that case, the new level will be charged and applied immediately. The user gets the new level access right after the payment.

s2Member doesn’t take into account the paid time left from the previous level. It won’t be discounted from the new payment, or time added to the access for it.

That’s called proration, and custom code has been written in the past by site owners to implement the kind they need for their use.

Here’s an example I wrote some months ago for someone:

// Proration for level 1 subscription upgrade to level 2 subscription.
if (current_user_is('s2member_level1') {
	$level1_price     = 50;  // Your level 1 price.
	$level1_days      = 365; // Your level 1 term in days.
	$level1_day_price = $level1_price / $level1_days;
	$level2_price     = 80;  // Your level 2 price.
	$user_eot_npt     = s2member_eot(); // https://s2member.com/kb-article/s2eot-shortcode-documentation/#toc-e00e3e46
	$user_days_left   = ceil(($user_eot_npt['time'] - time()) / DAY_IN_SECONDS);
	$user_credit      = ceil($user_days_left * level1_day_price);
	$level2_1st_pay   = $level2_price - $user_credit;

	// Now configure your Shortcode with trial term same as regular term, but trial amount with what you calculated above.
	// The Shortcode here has been abbreviated for clarity in this regard.
	echo do_shortcode('[s2Member-Pro-PayPal-Form ... ta="'.$level2_1st_pay.'" ... /]');
}

s2 doesn’t have a proration logic or mechanism included, but it’s something that I’ve wanted to make possible and may include in the future.

I’m adding your vote for this feature.

:slight_smile:

Clever. I’ll go ahead and implement that as your description is very clear and makes complete sense.

1 Like

And yes, please add my vote for this to be done automatically

1 Like