title: PHP Variable of Stripe API
body: <p>I need help with PHP and the Stripe API.</p>
  <pre><code>        $stripe-&gt;accountLinks-&gt;create([
              'account' =&gt; 'acct_1HtKYcRm0s9vfiNs',
              'refresh_url' =&gt; 'https://example.com/reauth',
              'return_url' =&gt; 'https://example.com/return',
              'type' =&gt; 'account_onboarding',
          ]);
  </code></pre>
  <p>That gives me back an answer like this:</p>
  <pre><code>{
    &quot;object&quot;: &quot;account_link&quot;,
    &quot;created&quot;: 1606772720,
    &quot;expires_at&quot;: 1606773020,
    &quot;url&quot;: &quot;https://connect.stripe.com/setup/s/QaVzgu7GNGFP&quot;
  }
  </code></pre>
  <p>I need help to know how to display the &quot;url&quot; in a variable in PHP.</p>
  <p>I've tried to do this but it doesn't work:</p>
  <pre><code>        $link = $stripe-&gt;accountLinks-&gt;create([
              'account' =&gt; 'acct_1HtKYcRm0s9vfiNs',
              'refresh_url' =&gt; 'https://example.com/reauth',
              'return_url' =&gt; 'https://example.com/return',
              'type' =&gt; 'account_onboarding',
          ]);
          $data = json_decode($link);
          $links = $data-&gt;url;
  </code></pre>
  <p>If someone knows what I can do it would help me a lot. Thanks :)</p>
  <p>EDIT:
  The var_dump returns this:</p>
  <pre><code>object(Stripe\AccountLink)#127 (4) { [&quot;object&quot;]=&gt; string(12) &quot;account_link&quot; [&quot;created&quot;]=&gt; int(1606856512) [&quot;expires_at&quot;]=&gt; int(1606856812) [&quot;url&quot;]=&gt; string(47) &quot;https://connect.stripe.com/setup/c/vD45DxCl0hZQ&quot; }
  </code></pre>
  <p>But I just need url string</p>