anchor.diff:      commit_transactions(BillingId, Transactions, 3).
   
   commit_transactions(BillingId, Transactions, Try) when Try > 0 ->
  +  lager:info("IAM commit_transactions"),
       case kz_datamgr:open_doc(?KZ_SERVICES_DB, BillingId) of
           {'error', _E} ->
               lager:error("could not open services for ~p : ~p retrying...", [BillingId, _E]),
  
positive.code:             end
      end;
  commit_transactions(BillingId, _Transactions, _Try) ->
      lager:error("too many attempts writing transaction to services in ~p", [BillingId]),
      'error'.
  
  -spec already_charged(ne_binary() | integer() , integer() | kz_json:objects()) -> boolean().
  already_charged(BillingId, Code) when is_integer(Code) ->
      kz_bookkeeper_braintree:already_charged(BillingId, Code).
  
  -spec charge_transactions(ne_binary(), kz_json:objects()) -> kz_json:objects().
  charge_transactions(BillingId, Transactions) ->
      charge_transactions(BillingId, Transactions, []).
  
  charge_transactions(_, [], FailedTransactionsAcc) ->
      FailedTransactionsAcc;
  
  charge_transactions(BillingId, [Transaction|Transactions], FailedTransactionsAcc) ->
      Result = case kz_json:get_value(<<"pvt_code">>, Transaction) of
                   ?CODE_TOPUP -> handle_topup(BillingId, Transaction);
                   _ -> handle_charged_transaction(BillingId, Transaction)
  
negative.code: 
  -spec is_good_standing(ne_binary()) -> boolean().
  is_good_standing(AccountId) ->
    lager:info("IAM is_good_standing"),
      wht_util:current_balance(AccountId) > 0.
  
  -spec transactions(ne_binary(), gregorian_seconds(), gregorian_seconds()) ->
  