Weiter zum Inhalt
Konto erstellen
oder
anmelden
Das Logo der Stripe-Dokumentation
/
KI fragen
Konto erstellen
Anmelden
Jetzt starten
Zahlungen
Finanzautomatisierung
Plattformen und Marktplätze
Geldmanagement
Entwickler-Tools
Jetzt starten
Zahlungen
Finanzautomatisierung
Jetzt starten
Zahlungen
Finanzautomatisierung
Plattformen und Marktplätze
Geldmanagement
Übersicht
Informationen zu Stripe Payments
Aktualisieren Sie Ihre Integration
Zahlungsanalysefunktionen
Online-Zahlungen
ÜbersichtIhren Use case findenZahlungen verwalten
Payment Links verwenden
Bezahlseite erstellen
Erweiterte Integration erstellen
In-App-Integration erstellen
Zahlungsmethoden
Zahlungsmethoden hinzufügen
Zahlungsmethoden verwalten
Schnellerer Bezahlvorgang mit Link
Zahlungsschnittstellen
Payment Links
Checkout
Web Elements
In-App-Elements
Zahlungsszenarien
Nutzerdefinierte Zahlungsabläufe
Flexibles Acquiring
Orchestrierung
Präsenzzahlungen
Terminal
    Übersicht
    Persönliche Zahlungen akzeptieren
    Integrationsdesign
    Wählen Sie Ihr Lesegerät aus
    Konzipieren einer Integration
    Quickstart
    Beispielanwendungen
    Tests
    Terminal einrichten
    Integration einrichten
    Mit einem Lesegerät verbinden
    Zahlung annehmen
    Kartenzahlungen einziehen
    Offline-Zahlungen annehmen
    Versand-/Telefonbezahlung
    Regionale Aspekte
    Während des Bezahlvorgangs
    Trinkgelder einziehen
    Zahlungsdetails erfassen und für die zukünftige Verwendung speichern
      Direkt speichern, ohne die Karte zu belasten
      Nach Zahlung speichern
    Flexible Autorisierungen
    Nach dem Bezahlen
    Transaktionen zurückerstatten
    Belege zur Verfügung stellen
    Checkout anpassen
    Anzeige des Warenkorbs
    Eingaben auf dem Bildschirm erfassen
    Ausgelesene Daten erfassen
    Erfassen von Daten durch Tippen für NFC-Geräte
    Apps auf Geräten
    Lesegeräte verwalten
    Lesegeräte anfordern, zurückgeben, ersetzen
    Lesegerät registrieren
    Standorte und Zonen verwalten
    Lesegeräte konfigurieren
    Verschlüsselung
    Quellen
    API-Referenzen
    Mobile Lesegeräte
    Intelligente Lesegeräte
    SDK-Migrationsleitfaden
    Bereitstellungscheckliste
    Produktdatenblätter für Lesegeräte von Stripe Terminal
Andere Stripe-Produkte
Financial Connections
Krypto
Climate
StartseiteZahlungenTerminalCollect and save payment details for future use

Notiz

Bis jetzt ist diese Seite noch nicht in dieser Sprache verfügbar. Wir arbeiten aber verstärkt daran, unsere Dokumentation in weiteren Sprachen bereitzustellen, und werden die Übersetzung sofort anzeigen, sobald diese verfügbar ist.

Save payment details after payment

Accept an in-person payment and save payment details to use later, when the customer is not present.

Seite kopieren

You can use Stripe Terminal to save payment details from an in-store purchase. A successful card_present payment returns a reusable card PaymentMethod in the generated_card attribute. There are several use cases:

  • A gym customer pays in person for an initial session and a membership subscription. The transaction sets up a generated_card to use for future automatic membership renewals.
  • A customer at a clothing store provides their email address when making a purchase at the checkout counter. The transaction creates a customer record and an associated saved generated_card. That allows the customer to log into the store’s website later and place an order using the same card.

The initial, in-person payment benefits from liability shift and, in certain markets, lower pricing for standard Terminal payments. However, subsequent payments using the generated_card are card-not-present online transactions, without the liability shift.

Create a customer

To set a card up for future payments, you must attach it to a Customer. Create a Customer object when your customer creates an account with your business. Customer objects allow for reusing payment methods and tracking across multiple payments.

Command Line
cURL
curl https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d name="Jenny Rosen" \ --data-urlencode email="jennyrosen@example.com"

Successful creation returns the Customer object. You can inspect the object for the customer id and store the value in your database for later retrieval.

You can find these customers in the Customers page in the Dashboard.

Create a PaymentIntent

API Reference

  • Create a PaymentIntent

Request a generated_card when you create a PaymentIntent by specifying a value for setup_future_usage. If you intend to only reuse the payment method when the customer is present in the checkout flow, use on_session. Otherwise, use off_session.

Command Line
curl
curl https://api.stripe.com/v1/payment_intents \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "setup_future_usage"="off_session" \ -d "customer"="{{CUSTOMER_ID}}" \ -d "amount"=1000 \ -d "currency"="usd" \ -d "payment_method_types[]"="card_present"

Notiz

Visa, Mastercard, American Express, Discover, co-branded eftpos, co-branded Interac, and co-branded girocard cards are supported as card_present payment methods that can be saved as type card.

Collect and process a payment method

SDK Reference

  • collectPaymentMethod (iOS)

When the customer is ready to pay and has consented to their payment method details being saved, pass allow_redisplay as always or limited into the collectPaymentMethod call. The value indicates the degree to which a payment method can be shown in a customer checkout flow.

PaymentViewController.swift
Swift
import UIKit import StripeTerminal class PaymentViewController: UIViewController, ReaderDisplayDelegate { // Label for displaying messages from the card reader let readerMessageLabel = UILabel(frame: .zero) var collectCancelable: Cancelable? = nil // ... // Action for a "Subscribe" button func subscribeAction() throws { let params = try PaymentIntentParametersBuilder().setCustomer(
"{{CUSTOMER_ID}}"
).build() Terminal.shared.createPaymentIntent(params) { createResult, createError in if let error = createError { print("createPaymentIntent failed: \(error)") } else if let paymentIntent = createResult { print("createPaymentIntent succeeded") let config = try CollectConfigBuilder().setAllowRedisplay(AllowRedisplay.always).build() self.collectCancelable = Terminal.shared.collectPaymentMethod(paymentIntent, config) { collectResult, collectError in if let error = collectError { print("collectPaymentMethod failed: \(error)") } else if let collectPaymentMethodPaymentIntent = collectResult { print("collectPaymentMethod succeeded") // ... Confirm the PaymentIntent Terminal.shared.confirmPaymentIntent(collectPaymentMethodPaymentIntent) { confirmResult, confirmError in if let error = confirmError { print("confirmPaymentIntent failed: \(error)") } else if let confirmedPaymentIntent = confirmResult { print("confirmPaymentIntent succeeded") } } } } } } }

Access the generated_card

A successful payment with a method that supports future use returns a PaymentIntent in the requires_capture or succeeded state. You can retrieve the generated_card payment method by expanding the PaymentIntent’s latest_charge property and viewing payment_method_details.card_present. If you passed the customer ID into the PaymentIntent creation call, the reusable PaymentMethod is automatically attached to the Customer object. Otherwise, you can manually attach it in a separate call.

Always verify that the PaymentIntent.latest_charge contains a generated_card value. Some payments, such as digital wallet payments and single-branded Interac, eftpos, or girocard card payments, might not create a generated card. If that happens, and you require a reusable payment method, you have two options:

  • Prompt the customer to save a different payment method using the flow to save a payment method without taking a payment.
  • Refund the in-person payment, indicate that the transaction failed, and instruct the customer to use a different payment method.

Mobile wallets considerations

Saved mobile wallets is only for off_session payments such as future subscription or other payments you initiate on behalf of your customer. When you save a digital wallet payment method, the generated_card has allow_redisplay=limited, to indicate its specific usage considerations.

When you attempt to charge a mobile wallet, make sure to pass off_session=true during PaymentIntent confirmation. If the customer is present in your checkout flow, you will need to instead use the Apple Pay and Google Pay integrations to re-prompt for payment method presentment.

Compliance

You’re responsible for your compliance with all applicable laws, regulations, and network rules when saving a customer’s payment details. For example, the European Data Protection Board has issued guidance regarding saving payment details. These requirements generally apply if you want to save your customer’s payment method for future use, such as presenting a customer’s payment method to them in the checkout flow for a future purchase or charging them when they’re not actively using your website or app.

Add terms to your website or app that state how you plan to save payment method details and allow customers to 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.

When you save a payment method, it can only be used for the specific usage that you included in your terms. If you want to charge customers when they’re offline and also save the customer’s payment method to present to them as a saved payment method for future purchases, you must explicitly collect consent from the customer. One way to do so is with a “Save my payment method for future use” checkbox.

War diese Seite hilfreich?
JaNein
Benötigen Sie Hilfe? Kontaktieren Sie den Kundensupport.
Nehmen Sie an unserem Programm für frühzeitigen Zugriff teil.
Schauen Sie sich unser Änderungsprotokoll an.
Fragen? Sales-Team kontaktieren.
LLM? Lesen Sie llms.txt.
Unterstützt von Markdoc