Determine all ordered pairs $(x, y)$ of nonnegative integers that satisfy the equation $$3x^2 + 2 \cdot 9^y = x(4^{y+1}-1).$$
We start with the given equation:
\[ 3x^2 + 2 \cdot 9^y = x(4^{y+1} - 1). \]

First, we rewrite \(9^y\) as \(3^{2y}\) and \(4^{y+1}\) as \((2^2)^{y+1} = 2^{2(y+1)}\):
\[ 3x^2 + 2 \cdot 3^{2y} = x(2^{2(y+1)} - 1). \]

Next, we multiply both sides by 3 to simplify the equation:
\[ 9x^2 + 2 \cdot 3^{2y+1} = 3x(2 \cdot 2^{2y+1} - 1). \]

Let \(a = 3x\) and \(b = 2y + 1\). Substituting these into the equation, we get:
\[ a^2 + 2 \cdot 3^b = a(2 \cdot 2^b - 1). \]

We now solve for \(a\) and \(b\) by considering different values of \(b\):

1. **Case 1: \(b = 1\)**
   \[ a^2 + 2 \cdot 3^1 = a(2 \cdot 2^1 - 1) \]
   \[ a^2 + 6 = a(4 - 1) \]
   \[ a^2 + 6 = 3a \]
   \[ a^2 - 3a + 6 = 0 \]
   The discriminant of this quadratic equation is:
   \[ \Delta = (-3)^2 - 4 \cdot 1 \cdot 6 = 9 - 24 = -15 \]
   Since the discriminant is negative, there are no real roots for \(a\).

2. **Case 2: \(b = 3\)**
   \[ a^2 + 2 \cdot 3^3 = a(2 \cdot 2^3 - 1) \]
   \[ a^2 + 54 = a(16 - 1) \]
   \[ a^2 + 54 = 15a \]
   \[ a^2 - 15a + 54 = 0 \]
   The discriminant of this quadratic equation is:
   \[ \Delta = (-15)^2 - 4 \cdot 1 \cdot 54 = 225 - 216 = 9 \]
   The roots are:
   \[ a = \frac{15 \pm \sqrt{9}}{2} = \frac{15 \pm 3}{2} \]
   \[ a = 9 \quad \text{or} \quad a = 6 \]
   For \(a = 9\), we have \(3x = 9 \Rightarrow x = 3\).
   For \(a = 6\), we have \(3x = 6 \Rightarrow x = 2\).
   Since \(b = 3\), we have \(2y + 1 = 3 \Rightarrow y = 1\).
   Thus, the solutions are \((x, y) = (3, 1)\) and \((x, y) = (2, 1)\).

3. **Case 3: \(b = 5\)**
   \[ a^2 + 2 \cdot 3^5 = a(2 \cdot 2^5 - 1) \]
   \[ a^2 + 486 = a(32 - 1) \]
   \[ a^2 + 486 = 31a \]
   \[ a^2 - 31a + 486 = 0 \]
   The discriminant of this quadratic equation is:
   \[ \Delta = (-31)^2 - 4 \cdot 1 \cdot 486 = 961 - 1944 = -983 \]
   Since the discriminant is negative, there are no real roots for \(a\).

4. **Case 4: \(b \geq 7\), \(b\) odd**
   For \(b \geq 7\), the quadratic equation \(a^2 - (2 \cdot 2^b - 1)a + 2 \cdot 3^b = 0\) will have a discriminant:
   \[ \Delta = (2 \cdot 2^b - 1)^2 - 8 \cdot 3^b \]
   For large \(b\), the term \((2 \cdot 2^b - 1)^2\) grows much faster than \(8 \cdot 3^b\), making the discriminant positive. However, solving these cases explicitly is complex and beyond the scope of elementary methods.

Thus, the only solutions in nonnegative integers are found in the cases where \(b = 3\).

The final answer is \( \boxed{ (3, 1) } \) and \((2, 1)\).