An elliptic function of level $N$ determines an elliptic genus of level $N$ as a Hirzebruch genus. It is known that any elliptic function of level $N$ is a specialization of the Krichever function that determines the Krichever genus. The Krichever function is the exponential of the universal Buchstaber formal group. In this work we give a specialization of the Buchstaber formal group such that this specialization determines formal groups corresponding to elliptic genera of level $N$. Namely, an elliptic function of level $N$ is the exponential of a formal group of the form $F(u,v) =(u^2 A(v) - v^2 A(u))/(u B(v) - v B(u))$, where $A(u),B(u)\in \mathbb C[[u]]$ are power series with complex coefficients such that $A(0)=B(0)=1$, $A''(0)=B'(0)=0$, and for $m = [(N-2)/2]$ and $n = [(N-1)/2]$ there exist parameters $(a_1,\dots ,a_m,b_1,\dots ,b_n)$ for which the relation $\prod _{j=1}^{n-1}(B(u) + b_j u)^2\cdot (B(u) + b_n u)^{N-2n} = A(u)^2 \prod _{k=1}^{m-1}(A(u) + a_k u^2)^2 \cdot (A(u) + a_m u^2)^{N-1-2m}$ holds. For the universal formal group of this form, the exponential is an elliptic function of level at most $N$. This statement is a generalization to the case $N>2$ of the well-known result that the elliptic function of level $2$ determining the elliptic Ochanine–Witten genus is the exponential of a universal formal group of the form $ F(u,v) =(u^2 - v^2)/(u B(v) - v B(u)) $, where $B(u)\in \mathbb C[[u]]$, $B(0)=1$, and $B'(0)=0$. We prove this statement for $N=3,4,5,6$. We also prove that the elliptic function of level $7$ is the exponential of a formal group of this form. Universal formal groups that correspond to elliptic genera of levels $N=5,6,7$ are obtained in this work for the first time.