Meteor.bindEnvironment and callbacks of async functions

I have come to a slight impasse with my current Braintree implementation. I am trying to call an API function which in itself is asynchronous and I can’t figure out how to execute Meteor specific code in the callback

Here is a Meteor server method that calls the Braintree BtGateway.subscription.search function and tries to store the results in a Meteor collection, but no matter what I do it bombs with

Exception in callback of async function: TypeError: keypath.split is not a function

Any pointers what I am doing wrong?

Meteor.methods({
  btSubscriptionSearch(planId){
    check(planId, String);
    if(BtGateway != null) {
      var subscriptionSearch = Meteor.wrapAsync(BtGateway.subscription.search, BtGateway.subscription);
      // search for a planId
      var searchFunction = function(search) {
        search.planId().is(planId);
      };
      // insert the response into a collection
      var responseFunction = Meteor.bindEnvironment(function (err, response) {
          for(var i in response) {
            var subscription = response[i];
            var id = Subscriptions.update(
              {id: subscription.id},
              {
                $set: subscription,
                $setOnInsert: subscription
              },
              {upsert: true}
            );
            console.log(subscription.id+' => '+id);
          });
        }
      );
      subscriptionSearch(searchFunction, responseFunction);
    } else {
      console.log('btSubscriptionSearch Error');
      throw new Meteor.Error(1001, 'No Braintree Gateway');
    }
  },
})

Just after posting this I looked up the Braintree Node.js API and something had changed, so I got it to work like this

Meteor.mehods({
  btSubscriptionSearch: async function(planId) {
    check(planId, String);
    var stream = await BtGateway.subscription.search(
      function (search) {
          search.planId().is(planId);
      }
    );
    stream.on('data', Meteor.bindEnvironment(function(subscription){
        var s = Subscriptions.findOne({id: subscription.id});
        if(s) {
          Subscriptions.update(s._id, {$set:{subscription}});
          console.log('updated '+subscription.id+' => '+s._id);
        } else {
          var id = Subscriptions.insert(subscription);
          console.log('inserted '+subscription.id+' => '+id);
        }
      })
    );
    stream.on('end', function() {
      console.log('btSubscriptionSearch done');
    });
  },
})