Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
      CITs and MITs
      How cards work
      Card Product Codes
      Cartes Bancaires
      eftpos Australia
      Installments
    Bank debits
    Bank redirects
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsAdd payment methodsCards

How cards work

Learn how an online credit or debit card payment works.

Copy page

Card fees

For information on payment method transaction fees, see local payment method pricing.

Cards are one of the most popular ways to pay online, with broad global reach. There are different types of cards and several steps in the process. To build a Stripe integration that supports all of your customers, see what goes on behind the scenes of a card payment.

Checking card details

Stripe checks that the details provided are formatted correctly (for example, the expiry 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 like Europe and India, may prompt the customer to authenticate a purchase (for example, by texting the customer a code to enter on the bank’s website). Watch our video to learn more.

Authorization

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

Capture

The money moves from the issuing bank to the Stripe user’s 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
cURL
curl https://api.stripe.com/v1/customers/cus_V9T7vofUbZMqpv \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "invoice_settings[default_payment_method]"=pm_1Msy7wLkdIwHu7ixsxmFvcz7

For information on how Checkout handles saved payment methods, see the create session API reference. 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

  • Cards
  • Co-badged cards compliance
  • Payment method integration options
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc