Stripe.listCards()

List all cards in Stripe for a customer.

Usage

Hover over inputs/exits for more info.

var Stripe = require('machinepack-stripe-subscriptions');


// List all cards in Stripe for a customer.

Stripe.listCards({

apiKey: 'somestring837483749blah',

customer: 'cus_4kmLwU2PvQBeqq',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (cards) {

 

},

});

Inputs

apiKey required

Your Stripe API key

'somestring837483749blah'
customer required

The Stripe id of the customer whose cards will be listed

'cus_4kmLwU2PvQBeqq'

Exits

error

An unexpected error occurred.

success

OK.

{ object: 'list',
  url: '/v1/customers/cu_14YepJ2eZvKYlo2CUJrwelj2/cards',
  has_more: false,
  data: 
   [ { id: 'card_14Yfhj2eZvKYlo2CDMqmQSc6',
       object: 'card',
       last4: '4242',
       brand: 'Visa',
       funding: 'credit',
       exp_month: 8,
       exp_year: 2016,
       fingerprint: 'Xt5EWLLDS7FJjR1c',
       country: 'US',
       name: 'c_brennan@me.com',
       address_line1: null,
       address_line2: null,
       address_city: null,
       address_state: null,
       address_zip: null,
       address_country: null,
       cvc_check: 'pass',
       address_line1_check: null,
       address_zip_check: null,
       customer: 'cus_4i4zVBclvGqTAN' } ] }