This paper is devoted to obtaining a wellposedness result for multidimensional BSDEs with possibly unbounded random time horizon and driven by a general martingale in a filtration only assumed to satisfy the usual hypotheses, i.e. the filtration may be stochastically discontinuous. We show that for stochastic Lipschitz generators and unbounded, possibly infinite, time horizon, these equations admit a unique solution in appropriately weighted spaces. Our result allows in particular to obtain a wellposedness result for BSDEs driven by discrete--time approximations of general martingales.