Will Refund Amount go towards bill payment?

My last month's bill amount was ~12,200. I got a refund which came after the billing date.

So my total amount due according to the bill is 12200.

But I got a refund of ~3000 in the next cycle.

Do I have to pay 12,200 this month or just the remaining amount?