The card you’re in credit with will refund you, they have to – I’ve made a calc error before when paying off a balance and closing a card (not by £900 though)
I’d assume that would go back in reverse to the Halifax CC you paid the £900 from as opposed to direct to you, otherwise it’s a loophole to liquidity, so if you can transfer the £900 you still owe to the other card then the two will nett off. You’ll get the transfer fee on both still, although if you can speak to a human at Halifax they might be kind and refund one.
A call to Halifax and give them a laugh will probably be able to reverse the original mistake too.
Unless this is either
a/ an elaborate scam for washing dirty money and losing £27 each time (assume 3% transfer fee at a guess)
b/ an elaborate construct to avoid the filter and this is really discussing the the situation in Mr Nutt’s allotment.