The reference implementation of the balance-api