Save card details after payment
Use Stripe Terminal to save card details for online reuse while processing in-person transactions.
When you successfully confirm a payment, the returned object contains a successful charge ID. This charge contains a generated_card ID, which represents the ID of a card PaymentMethod that’s used to charge the saved card.
The initial, in-person payment benefits from the liability shift (and in certain markets, lower pricing given to standard Terminal payments). But subsequent payments happen online and they’re treated as card-not-present. For example, a gym customer pays for an initial session in person and begins a membership in the same transaction. Or a clothing store collects a customer’s email address and payment method at the checkout counter during purchase, and the customer can log in later and use it again.
You can automatically attach the generated_card
PaymentMethod to a customer
object to easily retrieve saved card details in the future. When creating a PaymentIntent, provide a customer ID and set the setup_future_usage parameter to indicate you intend to make future payments with the payment method.
Note
Unless your business is a car rental service or hotel, you can’t save mobile wallets (for example, Apple Pay or Google Pay) for later reuse while transacting. We have a limited private beta available for users with a car rental service or hotel. To request access, please contact stripe-terminal-betas@stripe.com.
Compliance
You’re responsible for your compliance with all applicable laws, regulations, and network rules when saving a customer’s payment details. For instance, if you save a customer’s payment method for future use, you need their agreement. Getting that agreement up front allows you to save the customer’s payment details, and potentially even charge the customer when they’re not actively using your website or app, placing a MOTO order, or in your store.
Add terms to your checkout flow that state how you plan to save a customer’s payment method details and let the customer opt in. If you plan to charge the customer while they’re offline, then at a minimum, make sure that your terms also cover the following:
- The customer’s agreement to your initiating a payment or a series of payments on their behalf for specified transactions.
- The anticipated timing and frequency of payments (for instance, whether charges are for scheduled installment or subscription payments, or for unscheduled top-ups).
- How the payment amount is determined.
- Your cancellation policy, if you’re setting up the payment method for a subscription service.
Make sure you keep a record of your customer’s written agreement to these terms.
Client-side
With the iOS, Android, and React Native SDKs, you can create a PaymentIntent client-side and provide the customer
and set setup_future_usage
.
Server-side
The JavaScript SDK and server-driven integration require you to create the PaymentIntent on your server. For iOS or Android, you can create the PaymentIntent on your server if the information required to start a payment isn’t readily available in your app.
You can retrieve the saved card details by listing the card payment methods associated with that customer.