title: Bank Recipient - Stripe API
body: <p>I am currently trying to setup a user experience to enable the user to put down banking information to be stored as a recipient in order to transfer funds to account they set up.</p>
  
  <p>Here is the issue:</p>
  
  <p>When user sends in information, Stripe creates a token and that, using ajax is sent over to a .PHP file which handles the creation of the recipient account.  But on the creation of the recipient I get a <code>500 Error</code>:</p>
  
  <pre><code>POST /functions/stripeAcc/makeCustomer.php 500 (Internal Server Error) jquery-latest.min.js:2
  
  send - jquery-latest.min.js:2
  p.extend.ajax - jquery-latest.min.js:2
  stripeResponseHandler
  e.ajaxJSONP.success js.stripe.com/:1
  window.(anonymous function) js.stripe.com/:1
  (anonymous function) tokens:1
  </code></pre>
  
  <p>Here is the PHP file:</p>
  
  <pre><code>...
      $email = $_POST['email'];
      $name = $_POST['cardholderfullname'];
      $token = $_POST['token'];
      require_once('./stripe-php/lib/Stripe.php');
  
      Stripe::setApiKey("mykey");
  
      $recipient = Stripe_Recipient::create(array(
        "name" =&gt; $name,
        "type" =&gt; "individual",
        "bank_account" =&gt; $token,
        "email" =&gt; $email)
      );
  ... This is where the 500 happens
  </code></pre>
  
  <p>Now after I check my logs inside the <code>logs</code> on my Stripe Account I notice a call being placed with a <code>200 status</code> (this mean everything worked) except a recipient did not get made, so that is confusing right there.</p>
  
  <p>Log file:</p>
  
  <pre><code>Summary
  
  Time:
  2013/07/13 20:09:45
  Method:
  POST
  URL:
  /v1/tokens
  Status:
  200
  IP address:
  71.239.53.232
  
  Parsed Request Query Parameters
  
  bank_account:
  country: "US"
  routing_number: "110000000"
  account_number: "********6789"
  key: "myKey"
  callback: "sjsonp1373746168110"
  _method: "POST"
  
  Response body
  
  id: btok_2BxFI1xYXF8ECd
  livemode: false
  created: 1373746185
  used: false
  object: "token"
  type: "bank_account"
  bank_account:
  object: "bank_account"
  bank_name: "STRIPE TEST BANK"
  last4: "6789"
  country: "US"
  validated: false
  fingerprint: "wC1v8BWXZe7MyW3n"
  </code></pre>
  
  <p>I am using the test credentials for the Account number and Routing number:</p>
  
  <pre><code>Routing numbers
  
  Number  Type
  110000000   STRIPE TEST BANK US routing number
  Account numbers
  
  Number  Type
  000123456789    Successful US account number
  </code></pre>