Getting invoice amount to show user total before changing subscription
How can I retrieve the total charge to be applied to a credit card when a user is upgrading/downgrading a membership. I am trying to display a "You will be charged $X for Y prorated days" type message, but am unsure how to retrieve this information, as it looks like editSubscription will charge the card immediately. How could I do this? (php)
Thanks!
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 23 Dec, 2010 02:27 PM
The proration logic is fairly simple. Checkout http://support.cheddargetter.com/kb/pricing-plans/pricing-plan-chan....
2 Posted by egdelwonk on 23 Dec, 2010 02:54 PM
I understand the logic, I am speaking in terms of being able to calculate the total to display to the user so he knows the amount about to be charged to his card. Instead of "Oh yeah, we charged you X amount", is this something I would need to calculate on my end vs sending an API call?
I have the formula to prorate already:
X = Current Plan Dollar Amount
Y = New Plan Dollar Amount
D = Days remaining in plan
Rate = Y - (x - ( ( x / 30) * d ) )
Support Staff 3 Posted by Marc Guyer on 23 Dec, 2010 03:35 PM
Correct, you need to calculate the total on your end. We've updated the upgrade/downgrade KB article based on your formula:
http://support.cheddargetter.com/kb/pricing-plans/pricing-plan-chan...
Marc Guyer closed this discussion on 04 Nov, 2011 01:36 PM.