In 3.56 with mysql, it's not possible to accept a Customer Payment to pay down debt on a customer account. It always fails with a db error, saying the curdebt field cannot be null. The fix is simple -- in CustomerInfoExt, the updateCurDebt function should set the debt to 0 instead of null when it's paid off. Hopefully this is compatible across all other database backends as well. A 1-line patch is attached for convenience.