When you open a trade:
First, your own deposited cash is used
Then, once your cash balance has been fully used, the Credit will be applied
This means that the credit can only be used after you have invested your own deposited funds first.
Similarly, if there is a losing position, any losses will be deducted from your available balance first and any remaining losses, if any, from your credit.