I already signed up for the plan. Now I want to lower it. What will be the process of returning the remaining amount?
From the API docs :
POST https://api.stripe.com/v1/customers/{CUSTOMER_ID}/subscription
Signs the client to the plan, that is, the client will be billed monthly, starting from registration. If the client already has an active subscription, we will update it to the new plan and, possibly, proportionally evaluate the price we charge next month to compensate for any price changes.
It's pretty clear that this is what you want to do.
To return the amount we need charge_id?
While you probably don't need to return it yourself, given that changing the subscription works, the documents on return say you need a charge identifier.
Given that the answers to your questions were fully contained in the documentation, I highly recommend that you review the documentation before asking your next question.
source share