PaymentApi tests + bug fixes