Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

How cards work


How cards work

Learn how an online credit or debit card payment works.

Cards are one of the most popular ways to pay online globally. There are different types of cards and several steps in the process. For information on payment method transaction fees, see local payment method pricing.

Payment flow

To build a Stripe integration that supports all of your customers, learn how the card payment flow works.

Checking card details

Stripe checks that the details provided are formatted correctly (for example, the expiration date isn’t in the past). There’s no guarantee that the card itself is valid yet.

Customer authentication

Some banks, especially in regulated regions such as Europe and India, might prompt the customer to authenticate a purchase. For example, the customer might receive a text with a code to enter on the bank’s website.

Authorization

The bank checks for sufficient funds and, if successful, holds the amount on the customer’s account to guarantee it for you.

Capture

The money moves from the issuing bank to your account.

Card updates

Updating a saved card can only change its name, billing address, expiration date, or metadata. To make any other changes, you must delete the card and create a new one.

To let your customers manage their own payment methods, implement processes that allow them to manually update and replace their saved cards.

To change a customer’s default payment method for invoices and subscriptions, make an API call to update customer and provide a new value for the invoice_settings.default_payment_method property.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

For information on how Checkout handles saved payment methods, see Create a Checkout Session. To consider default payment methods in other scenarios, use custom code.

Automatic card updates

Saved payment method details can continue to work even if the issuing bank replaces the physical card. Stripe works with card networks and automatically attempts to update saved card details whenever a customer receives a new card (for example, replacing an expired card or one that was reported lost or stolen). This allows your customers to continue using your service without interruption and reduces the need for you to collect new card details whenever a card is replaced.

Automatic card updates require card issuers to participate with the network and provide this information. It’s widely supported in the United States, allowing Stripe to automatically update most American Express, Visa, Mastercard, and Discover cards issued there. International support varies from country to country. It isn’t possible to identify cards that support automatic updates.

You can listen for Stripe webhooks to learn of card update activity:

  • The payment _ method. updated event notifies you of updates to a card through an API call.
  • The payment _ method. automatically _ updated event notifies you of automatic card updates from the network.

These events include the card’s new expiration date and last four digits, so you can update your own records as needed. If the card update includes a new card number, the fingerprint changes.

See also

Last verified 2026-09-24

Is this helpful?