createInvoice() Error - Negative Balance

Question:
Why this error is coming?
image

Product:
Wix Velo

What are you trying to achieve:
Create an invoice through custom payment form from Velo after the payment is successfully made by the customer.

What have you already tried:
I am following this documentation (though I don’t see the use of addPayment() in my case because I am creating invoice after the payment is made, so I am assuming with the payment ID included in the object while creating invoice, it should auto-include the transaction details.)

Additional information:
I don’t understand why the balance is negative… The payment was of “1.49”.

Resolved. I didn’t add the quantity parameter.