Link payment method to financial account when created using api
When trying to add payment method through api no financial account is link to it, hence there will be incorrect value stored in civicrm_financial_trxn.to_financial_account_id(i.e NULL probably).