title: Stripe: Whats the different between Source vs. Card vs. Bank vs Payment Method?
body: <p>I'm using Stripe for the first time an I'm little confused about the different APIs they provide. There is the Payment Method API which is the recommended one for handling payment methods for a customer but currently it supports only credit cards if I understand it correctly...</p>
  
  <p>But I need different payment methods for example bank accounts. So for that Stripe provides the Card, Bank and Source object. Whats the different between them? </p>
  
  <p>I tried each of them and couldn't see any difference in their behaviour. My main problem is that I want to change the default source for the payment if customer wants. So the customer object provides a default_source parameter but it doesn't change the default source when I change it. I tried to change the default from card to bank but it doesn't work. So I think I misunderstood the concept of the Payment Method, Sources, Card and Bank objects. </p>
  
  <p>So can anyone explain me how I have to use these different objects?</p>
  
  <p>I provide you my code below.</p>
  
  <p>My code for setting default source (doesn't change anything is Stripe dashboard):
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>const customer = req.body.customer;
  const token = req.body.token;
  
  stripe.customers.update(
     customer,
     {
       default_source: token //token looks like btok_231disjaohq0dj21sp
     }
  ).then(customer =&gt; {
      res.send(customer);
  }).catch(err =&gt; {
          res.send(err);
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Nothing changed in dashboard:
  <a href="https://i.stack.imgur.com/8wtsc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8wtsc.png" alt="enter image description here"></a></p>
  
  <p>My code to create a bank account (this works):
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>stripe.tokens.create({
          bank_account: {
              country: 'US',
              currency: 'usd',
              account_holder_name: decoded.account_holder_name,
              account_holder_type: 'individual',
              routing_number: '110000000',
              account_number: '000123456789'
          }
      }).then(token =&gt; {
      
          stripe.customers.createSource( //there is .create and .createSource whats the difference?
              decoded.userId,
              {
                  source: token.id
              }
  
          ).then(bank_account =&gt; {
              res.send(bank_account);
          }).catch(err =&gt; {
              res.send(err);
          })
  
      }).catch(err =&gt; {
          res.send(err);
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>My code to create a credit card (works):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>stripe.paymentMethods.create({
          type: "card",
          card: {
              number: decoded.number,
              exp_month: decoded.month,
              exp_year: decoded.year,
              cvc: decoded.cvc
          }
      }).then(token =&gt; {
  
          stripe.paymentMethods.attach(
              token.id,
          {
            customer: decoded.customer, 
          }
          ).then(card =&gt; {
              res.send(card);
          }).catch(err =&gt; {
              res.send(err);
          });
  
      }).catch(err =&gt; {
          res.send(err);
      });</code></pre>
  </div>
  </div>
  </p>