Skip to content

Cards Fresh

Cards are one of the most popular ways to pay online, with broad global reach. Stripe supports credit and debit cards from all major networks.

How card payments work

1. Check card details

Stripe validates formatting (expiry date, card number length, Luhn check). This doesn't confirm the card is valid with the bank.

2. Customer authentication

Some banks require customers to authenticate — especially in regulated regions like Europe (SCA) and India. The customer receives a one-time code or is redirected to their bank's verification flow.

3. Authorization

The bank checks for sufficient funds and holds the amount on the customer's account, guaranteeing it for you.

4. Capture

The money moves from the issuing bank to your Stripe balance.

Supported card networks

NetworkAPI enum
Visavisa
Mastercardmastercard
American Expressamex
Discoverdiscover
JCBjcb
UnionPayunionpay
Diners Clubdiners

Accept card payments

Cards are included in dynamic payment methods by default. To accept cards explicitly:

javascript
const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  payment_method_types: ['card'],
});

Automatic card updates

Stripe automatically updates saved card details when issuers replace cards (expired cards, lost/stolen cards). This keeps subscriptions and saved payment methods working without requiring customers to re-enter their details.

Listen for these events:

  • payment_method.updated — card updated via API
  • payment_method.automatically_updated — automatic network update

Update a saved card

You can update a saved card's expiration date, billing address, or name:

bash
curl https://api.stripe.com/v1/customers/cus_123/sources/card_abc \
  -u "sk_test_YOUR_KEY:" \
  -d name="New Name" \
  -d exp_month=12 \
  -d exp_year=2026

To change any other detail, delete and recreate the card.

Change a customer's default card

bash
curl https://api.stripe.com/v1/customers/cus_123 \
  -u "sk_test_YOUR_KEY:" \
  -d "invoice_settings[default_payment_method]=pm_abc123"

Authorization and capture

By default, Stripe both authorizes and captures in one step. For manual capture (e.g., charging after shipping):

javascript
const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  capture_method: 'manual',
});

// Later, capture:
await stripe.paymentIntents.capture('pi_123');

Uncaptured authorizations expire after 7 days.

3D Secure (3DS)

Stripe automatically handles 3DS when required by the card issuer or by your Radar rules. The PaymentIntent enters requires_action status, and Stripe.js prompts the customer to complete authentication.

After authentication, the payment resumes automatically if using Stripe.js. For off-session payments that require 3DS, bring the customer back on-session.

Testing cards

See Quick Reference → Test Cards for a full list of test card numbers for different scenarios (brands, declines, 3DS).

Stripe API Reference - Self-contained docs reference, refreshed 2026-05-18