I think you could remove window and just continue using Conekta.token.create(...