Stripe API

Stripe CheckoutAPI ReferenceGet API Keys

Test Cards

In test mode, you can use these test cards to simulate a successful transaction:

NumberCard type
4242 4242 4242 4242Visa
4012 8888 8888 1881Visa
5555 5555 5555 4444MasterCard
5105 1051 0510 5100MasterCard
3782 822463 10005American Express
3714 496353 98431American Express
6011 1111 1111 1117Discover
6011 0009 9013 9424Discover
3056 9309 0259 04Diners Club
3852 0000 0232 37Diners Club
3530 1113 3330 0000JCB
3566 0020 2036 0505JCB
Stripe Successful Charge Example

This is the response you will get when customer's card has been charged successfully.You could use some of the data below for logging purposes.

{ id: 'ch_103qzW2eZvKYlo2CiYcKs6Sw',
  object: 'charge',
  created: 1397510564,
  livemode: false,
  paid: true,
  amount: 395,
  currency: 'usd',
  refunded: false,
  card:
    { id: 'card_103qzW2eZvKYlo2CJ2Ss4kwS',
      object: 'card',
      last4: '4242',
      type: 'Visa',
      exp_month: 11,
      exp_year: 2015,
      fingerprint: 'Xt5EWLLDS7FJjR1c',
      customer: null,
      country: 'US',
      name: '[email protected]',
      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 },
  captured: true,
  refunds: [],
  balance_transaction: 'txn_103qzW2eZvKYlo2CNEcJV8SN',
  failure_message: null,
  failure_code: null,
  amount_refunded: 0,
  customer: null,
  invoice: null,
  description: '[email protected]',
  dispute: null,
  metadata: {},
  statement_description: null }