I have already subscribed to a plan. Now I want to downgrade it. What will be the process of refunding the remaining amount?
From the API docs:
POST https://api.stripe.com/v1/customers/{CUSTOMER_ID}/subscription
Subscribes a customer to a plan, meaning the customer will be billed monthly starting from signup. If the customer already has an active subscription, we'll update it to the new plan and optionally prorate the price we charge next month to make up for any price changes.
It's pretty clear that this is what you want to do.
To refund amount do we need charge_id?
While you probably don't need to refund it yourself, given the way that changing the subscription works, the docs on refunding say that you do need the charge ID.
Given that the answers to your questions were entirely contained within the documentation, I highly advise you to review the documentation before asking your next question.