title: Laravel Cashier - How to Check if Stripe Payment was Successful
body: <p>I am using Cashier in Laravel 5.1 for stripe payment. I want to check how to create a new database entry only when the stripe payment is successful. I am doing something like this:</p>
  
  <pre><code>if ($user-&gt;subscribed())
  {
          $subscribe = $user-&gt;subscription()-&gt;increment($totalQuantity);
  }
  else {
          $subscribe = $user-&gt;subscription('monthly')-&gt;quantity($totalQuantity)-&gt;create($postData['token']);
  }
  
  if($subscribe) {
     // Insert into Database
  }
  </code></pre>
  
  <p>I thought the stripe subscription will return true or false so I can check if the last payment was successful and proceed. But the <strong><code>$subscribe</code></strong> is empty. </p>
  
  <p>How can I check if the last stripe payment was successful before I proceed with the DB insert queries? I have read the <a href="http://laravel.com/docs/5.0/billing#checking-subscription-status" rel="nofollow">docs</a> and it only mentioned about checking the overall subscription like using </p>
  
  <pre><code>`if ($user-&gt;subscribed())`
  </code></pre>
  
  <p>but it doesn't mention about how to check if the last stripe subscription charge was successful. How will I do that?</p>