In my application I have 3 types of monthly auto-renewing subscriptions.
Pro 3.99$ Premium 2.99$ Standard 1.99$
A user who is already having a standard subscription plan, plans to upgrade to Premium after 15days of usage. In this case who is responsible for refunding the remaining amount on usage charge. If its developers responsibility what is the API to use and how to calculate refund.
It's all done automatically for you:
When someone switches to a subscription that you’ve ranked at a higher level. The customer’s prorated payment from lower level subscription is refunded to the original payment method. They’re charged for the higher level subscription, which goes into effect immediately. The date of upgrade is the renewal date for the higher level subscription.