# Ein Abonnement per SEPA-Lastschriftverfahren einrichten Erfahren Sie, wie Sie ein Abonnement mit dem SEPA-Lastschriftverfahren erstellen und abrechnen können. # Gehostete Seite > This is a Gehostete Seite for when platform is web and payment-ui is stripe-hosted. View the full page at https://docs.stripe.com/billing/subscriptions/sepa-debit?platform=web&payment-ui=stripe-hosted. Sehen Sie sich das [Beispiel auf GitHub](https://github.com/stripe-samples/checkout-single-subscription) an oder sehen Sie sich die [Demo](https://checkout.stripe.dev/checkout) an. Eine [Checkout-Sitzung](https://docs.stripe.com/api/checkout/sessions.md) repräsentiert die Details der Kaufabsicht Ihres Kunden/Ihrer Kundin. Sie erstellen eine Checkout-Sitzung, wenn Ihre Kundinnen/Kunden ein *Abonnement* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) starten möchten. Nachdem Ihre Kundinnen/Kunden zu einer Checkout-Sitzung umgeleitet wurden, präsentiert Stripe ein Zahlungsformular, von dem aus sie ihren Kauf abschließen können. Sobald Ihre Kunden einen Kauf getätigt haben, werden sie wieder auf Ihre Seite zurückgeleitet. ## Stripe einrichten [Serverseitig] Installieren Sie den Stripe-Client Ihrer Wahl: #### Ruby ```bash # Available as a gem sudo gem install stripe ``` ```ruby # If you use bundler, you can add this line to your Gemfile gem 'stripe' ``` Installieren Sie die Stripe-CLI (optional). Die CLI ermöglicht [Webhook-Tests](https://docs.stripe.com/webhooks.md#test-webhook) und kann zum Erstellen Ihrer Produkte und Preise ausgeführt werden. Weitere Installationsoptionen finden Sie unter [Mit der Stripe-CLI loslegen](https://docs.stripe.com/stripe-cli.md). ## Preismodell erstellen [Dashboard] [Stripe-CLI] [Wiederkehrende Preismodelle](https://docs.stripe.com/products-prices/pricing-models.md) umfassen die Produkte und Dienstleistungen, die Sie anbieten, die Preise dafür, welche Währungen Sie für Zahlungen verwenden und den Leistungszeitraum (für Abos). Verwenden Sie zum Aufbau des Preismodells [Produkte](https://docs.stripe.com/api/products.md) (was Sie anbieten) und [Preise](https://docs.stripe.com/api/prices.md) (Höhe und Abrechnungsintervall). In diesem Beispiel wird ein Pauschalpreisdienst mit zwei verschiedenen Service-Optionen verwendet: Basis und Premium. Für jede Service-Option müssen Sie ein Produkt und einen wiederkehrenden Preis erstellen. Um eine einmalige Gebühr, z. B. für die Einrichtung, hinzufügen möchten, erstellen Sie ein drittes Produkt mit einem einmaligen Preis. Jedes Produkt wird in monatlichen Intervallen abgerechnet. Der Preis für das Basisprodukt beträgt 5 EUR. Der Preis für das Premiumprodukt beträgt 15 EUR. Ein Beispiel mit drei Stufen finden Sie im Leitfaden zu [Pauschalpreismodellen](https://docs.stripe.com/subscriptions/pricing-models/flat-rate-pricing.md). #### Dashboard Gehen Sie zur Seite [Produkt hinzufügen](https://dashboard.stripe.com/test/products/create) und erstellen Sie zwei Produkte. Fügen Sie für jedes Produkt einen Preis hinzu, jeweils mit einem monatlich wiederkehrenden Abrechnungszeitraum: - Premium-Produkt: Premium-Dienstleistung mit zusätzlichen Funktionen - Preis: Pauschalpreis | 15 EUR - Basic-Produkt: Basic-Dienstleistung mit minimalem Funktionsumfang - Preis: Pauschalpreis | 5 EUR Zeichnen Sie nach Erstellung der Preise die Preis-IDs auf, sodass diese in anderen Schritten verwendet werden können. Preis-IDs sehen in etwa wie folgt aus: `price_G0FvDp6vZvdwRZ`. Wenn Sie bereit sind, verwenden Sie die Schaltfläche **In Live-Modus kopieren** oben rechts auf der Seite, um Ihr Produkt aus der [Sandbox in den Live-Modus zu kopieren](https://docs.stripe.com/keys.md#test-live-modes). #### API Sie können die API zum Erstellen der [Produkte](https://docs.stripe.com/api/products.md) und [Preise](https://docs.stripe.com/api/prices.md) verwenden. Premiumprodukt erstellen: ```curl curl https://api.stripe.com/v1/products \ -u "<>:" \ --data-urlencode "name=Billing Guide: Premium Service" \ -d "description=Premium service with extra features" ``` Basisprodukt erstellen: ```curl curl https://api.stripe.com/v1/products \ -u "<>:" \ --data-urlencode "name=Billing Guide: Basic Service" \ -d "description=Basic service with minimum features" ``` Zeichnen Sie Preis-ID für jedes Produkt auf. Die Preis-IDs sehen in etwa wie folgt aus: ```json { "id": "prod_H94k5odtwJXMtQ", "object": "product", "active": true, "attributes": [ ], "created": 1587577341, "description": "Premium service with extra features", "images": [ ], "livemode": false, "metadata": { }, "name": "Billing Guide: Premium Service", "statement_descriptor": null, "type": "service", "unit_label": null, "updated": 1587577341 } ``` Verwenden Sie die Produkt-IDs, um einen Preis für jedes Produkt zu erstellen. Die Zahl [unit_amount](https://docs.stripe.com/api/prices/object.md#price_object-unit_amount) wird in Cent angegeben, also z. B.`1500` = 15 EUR. Premiumpreis erstellen: ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d product={{PREMIUM_PRODUCT_ID}} \ -d unit_amount=1500 \ -d currency=usd \ -d "recurring[interval]=month" ``` Basispreis erstellen: ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d product={{BASIC_PRODUCT_ID}} \ -d unit_amount=500 \ -d currency=usd \ -d "recurring[interval]=month" ``` Zeichnen Sie Preis-ID für jeden Preis auf, sodass diese in nachfolgenden Schritten verwendet werden können. Die Preis-IDs sehen in etwa wie folgt aus: ```json { "id": "price_HGd7M3DV3IMXkC", "object": "price", "product": "prod_HGd6W1VUqqXGvr", "type": "recurring", "currency": "eur", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "active": true, "billing_scheme": "per_unit", "created": 1589319695, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "unit_amount": 1500, "unit_amount_decimal": "1500", "tiers": null, "tiers_mode": null, "transform_quantity": null } ``` Informationen zu anderen Preismodellen finden Sie in den [Billing-Beispielen](https://docs.stripe.com/products-prices/pricing-models.md). ## Checkout-Sitzung erstellen [Clientseitig] [Serverseitig] Fügen Sie Ihrer Website eine Checkout-Schaltfläche hinzu, die einen serverseitigen Endpoint aufruft, um eine Checkout-Sitzung zu erstellen. ```html Checkout
``` ### Checkout-Sitzungsparameter Eine vollständige Liste der Parameter, die übergeben werden können, finden Sie unter [Checkout-Sitzung erstellen](https://docs.stripe.com/api/checkout/sessions/create.md). Erstellen Sie eine Checkout-Sitzung mit der ID eines bestehenden *Preises* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions). Stellen Sie sicher, dass der Modus auf `subscription` gesetzt ist und dass Sie mindestens einen wiederkehrenden Preis übergeben. Zusätzlich zu wiederkehrenden Preisen können Sie auch einmalige Preise hinzufügen. Leiten Sie Ihre Kundinnen/Kunden nach dem Erstellen der Checkout-Sitzung zu der in der Antwort zurückgegebenen [URL](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-url) weiter. #### cURL ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Wenn Ihre Kundinnen und Kunden ihre Zahlung erfolgreich abgeschlossen haben, werden Sie an die `success_url` weitergeleitet. Hierbei handelt es sich um eine Seite auf Ihrer Website, auf der Ihre Kundinnen und Kunden darüber informiert werden, dass ihre Zahlung erfolgreich durchgeführt wurde. Stellen Sie die Sitzungs-ID auf Ihrer Erfolgsseite zur Verfügung, indem Sie die Vorlagenvariable `{CHECKOUT_SESSION_ID}` wie im obigen Beispiel in die `success_url` einfügen. Wenn Ihre Kundin/Ihr Kunde in einer Checkout-Sitzung auf Ihr Logo klickt, ohne eine Zahlung abzuschließen, leitet Checkout sie/ihn zurück auf die Seite Ihrer Website, die vor der Weiterleitung zu Checkout angezeigt wurde. Checkout-Sitzungen laufen standardmäßig 24 Stunden nach Erstellung ab. Aktivieren Sie in Ihrem [Dashboard](https://dashboard.stripe.com/settings/payment_methods) die Zahlungsmethoden, die Sie von Ihren Kundinnen und Kunden akzeptieren möchten. Checkout unterstützt [mehrere Zahlungsmethoden](https://docs.stripe.com/payments/payment-methods/payment-method-support.md#product-support). > Verlassen Sie sich beim Erkennen von initiierten Zahlungen nicht allein auf die Weiterleitung auf die `success_url`: > > - Böswillige Nutzer/innen könnten, ohne zu bezahlen, direkt auf die `success_url` zugreifen und sich so unberechtigt Zugang zu Waren und Dienstleistungen verschaffen. - Nach einer erfolgreichen Zahlung schließen Kundinnen und Kunden möglicherweise ihren Browser-Tab, bevor sie zur `success_url` weitergeleitet werden. ## Bestätigen, dass die Zahlung erfolgreich durchgeführt wurde Wenn Ihre Kund/innen ihre Zahlung erfolgreich abschließen, werden sie von Stripe an die URL weitergeleitet, die Sie im `success_url`-Parameter angegeben haben. Hierbei handelt es sich in der Regel um eine Seite auf Ihrer Website, auf der Ihre Kund/innen darüber informiert werden, dass ihre Zahlung erfolgreich durchgeführt wurde. Bei handelt es sich jedoch um eine Zahlungsmethode mit verzögerter Benachrichtigung, was bedeutet, dass Geldmittel nicht sofort verfügbar sind. Deshalb sollten Sie mit der *Ausführung* (Fulfillment is the process of providing the goods or services purchased by a customer, typically after payment is collected) der Bestellung warten, bis das Geld auf Ihrem Konto ist. Nach erfolgreicher Zahlung ändert sich der zugrunde liegende *PaymentIntent* (The Payment Intents API tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods)-Status von `„processing`“ in `„succeeded“`. Sie können auf verschiedene Weise bestätigen, dass die Zahlung erfolgreich ist: #### Dashboard Erfolgreiche Zahlungen werden in der [Zahlungsliste](https://dashboard.stripe.com/payments) des Dashboards angezeigt. Wenn Sie auf eine Zahlung klicken, gelangen Sie zur Seite mit den Zahlungsdetails. Der Abschnitt **Checkout-Übersicht** enthält Abrechnungsinformationen und die Liste der gekauften Artikel, die Sie zur manuellen Ausführung der Bestellung verwenden können. ![](https://b.stripecdn.com/docs-statics-srv/assets/source.16d3029596357c80a8efdbbfe106108a.png) > Durch Senden von E-Mail-Benachrichtigungen über erfolgreich abgeschlossene Kundenzahlungen kann Stripe Ihnen helfen, den Überblick über eingehende Zahlungen zu behalten. Verwenden Sie das Dashboard, um [E-Mail-Benachrichtigungen zu konfigurieren](https://dashboard.stripe.com/settings/user). #### Webhooks Wir senden die folgenden Checkout-Ereignisse, wenn sich der Zahlungsstatus ändert: | Ereignisname | Beschreibung | Nächste Schritte | | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | [checkout.session.completed](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.completed) | Die Kundin/der Kunde hat die Lastschriftzahlung nach Übermittlung des Checkout-Formulars erfolgreich autorisiert. | Warten Sie, bis die Zahlung erfolgt oder fehlschlägt. | | [checkout.session.async_payment_succeeded](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_succeeded) | Die verzögerte Zahlungsmethode war letztendlich erfolgreich. | Wickeln Sie die Bestellung der Kundin/des Kunden ab. | | [checkout.session.async_payment_failed](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_failed) | Die verzögerte Zahlungsmethode ist letztendlich fehlgeschlagen. | Senden Sie der Kundin/dem Kunden eine E-Mail und bitten Sie sie/ihn, die Zahlung erneut zu versuchen. | | [invoice.paid](https://docs.stripe.com/api/events/types.md#event_types-invoice.paid) | Die Zahlung der Kundin/des Kunden war erfolgreich. | Wickeln Sie die Bestellung der Kundin/des Kunden ab. | | [invoice.payment_failed](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_failed) | Die Zahlung der Kundin/des Kunden wurde abgelehnt oder ist aus einem anderen Grund fehlgeschlagen. | Fordern Sie den/die Kund/in per E-Mail auf, die Zahlung erneut zu versuchen. | Ihr Webhook-Code muss alle diese Checkout-Ereignisse verarbeiten können. Jede Webhook-Nutzlast in Checkout beinhaltet das [Session-Objekt von Checkout](https://docs.stripe.com/api/checkout/sessions.md) und Rechnungs-Webhooks enthalten das [Invoice](https://docs.stripe.com/api/invoices/object.md)-Objekt. Beide enthalten Informationen über die *Kunden/Kundinnen* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) und den *PaymentIntent* (The Payment Intents API tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods). Stripe sendet den Webhook `checkout.session.completed` an Ihren Server, bevor Ihre Kund/innen weitergeleitet werden. Ihre Annahme des Webhooks (ein beliebiger `2xx`-Statuscode) löst die Weiterleitung der Kund/innen an die `success_url` aus. Wenn Stripe innerhalb von 10 Sekunden nach erfolgreicher Zahlung keine volle Empfangsbestätigung erhält, werden Ihre Kund/innen automatisch zur `success_url`-Seite weitergeleitet. Wir empfehlen die [Verwendung von Webhooks](https://docs.stripe.com/webhooks.md), um den Erfolg der Zahlung zu bestätigen und die gekauften Waren zu versenden bzw. Dienstleistungen zu erbringen. Nachfolgend finden Sie ein Beispiel für einen Webhook-Endpoint, der den Erfolg oder Misserfolg einer Zahlung handhabt: #### Ruby ```ruby # Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. # Find your keys at https://dashboard.stripe.com/apikeys. client = Stripe::StripeClient.new('<>') # You can find your endpoint's secret in your webhook settings endpoint_secret = 'whsec_...' # Using Sinatra post '/webhook' do payload = request.body.read event = nil # Verify webhook signature and extract the event # See https://stripe.com/docs/webhooks#verify-events for more information. sig_header = request.env['HTTP_STRIPE_SIGNATURE'] begin event = Stripe::Webhook.construct_event( payload, sig_header, endpoint_secret ) rescue JSON::ParserError => e # Invalid payload status 400 return rescue Stripe::SignatureVerificationError => e # Invalid signature status 400 return end case event['type'] when 'checkout.session.completed' session = event['data']['object'] subscription_id = session.subscription # Find the subscription or save it to your database. # invoice.paid may have fired before this so there # could already be a subscription. find_or_create_subscription(subscription_id) when 'invoice.paid' invoice = event['data']['object'] subscription_id = invoice.parent.subscription_details.subscription # Find the subscription or save it to your database. # checkout.session.completed may not have fired yet # so we may need to create the subscription. subscription = find_or_create_subscription(subscription_id) # Fulfill the purchase fulfill_order(invoice) # Record that the subscription has been paid for # this payment period. invoice.paid will fire every # time there is a payment made for this subscription. record_as_paid_for_this_period(subscription) when 'invoice.payment_failed' invoice = event['data']['object'] # Send an email to the customer asking them to retry their payment email_customer_about_failed_payment(invoice) end status 200 end ``` Sie können Informationen über die Kund/innen, Zahlungen oder Abonnements abrufen, indem Sie die `Kunden`-, `PaymentIntent`- oder `Abo`-Objekte abrufen, auf die von den Eigenschaften `Kunde/Kundin`, `payment_intent` und `Abo` in der Webhook-Nutzlast verwiesen wird. ### Posten aus einem Webhook abrufen Checkout-Webhooks geben standardmäßig keine `line_items` zurück. Um die mit der Checkout-Sitzung erstellten Posten abzurufen, führen Sie eine zusätzliche Anfrage mit der ID der Checkout-Sitzung durch: #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions/{{CHECKOUT_SESSION_ID}}/line_items \ -u <>: ``` #### Stripe-CLI ```bash stripe get /v1/checkout/sessions/{{CHECKOUT_SESSION_ID}}/line_items ``` ### Webhooks lokal testen Verwenden Sie die [Stripe-CLI](https://docs.stripe.com/stripe-cli.md), um Webhooks lokal zu testen. Nach der Installation können Sie Ereignisse an Ihren Server weiterleiten: ```bash stripe listen --forward-to localhost:4242/webhook Ready! Your webhook signing secret is '{{WEBHOOK_SIGNING_SECRET}}' (^C to quit) ``` Erfahren Sie mehr über die [Einrichtung von Webhooks](https://docs.stripe.com/webhooks.md). #### Drittanbieter-Plugins Sie können Plugins wie [[Zapier]](https://stripe.com/works-with/zapier) verwenden, um Ihre Systeme für die Bestellausführung automatisch mit Informationen aus Stripe-Zahlungen zu aktualisieren. Nachfolgend finden Sie einige Beispiele für unterstützte Automatisierungen mithilfe von Plugins: - Aktualisieren der zur Bestellungsverfolgung verwendeten Tabellen nach einer erfolgreichen Zahlung - Aktualisieren der Bestandsverwaltungssysteme nach einer erfolgreichen Zahlung - Auslösen von Benachrichtigungen an interne Kundenservice-Teams mittels E-Mail- oder Chat-Anwendungen ## Integration testen Sie können Ihre Integration unter Verwendung der unten aufgeführten IBANs testen. Die Zahlungsmethodendetails werden für jede IBAN erfolgreich erfasst, weisen jedoch bei Abbuchung ein unterschiedliches Verhalten auf. ##### Test-IBANs Sie können diese Test-IBANs mit dem Payment Element verwenden, um Ihre SEPA-Lastschrift-Integration zu testen. Wenn Sie einen dieser Testwerte eingeben , validiert das Payment Element automatisch die IBAN und zeigt das Mandat an. ### AT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | AT611904300234573201 | pm_success_at | The PaymentIntent status transitions from `processing` to `succeeded`. | | AT321904300235473204 | pm_successDelayed_at | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | AT861904300235473202 | pm_failed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | AT051904300235473205 | pm_failedDelayed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | AT591904300235473203 | pm_disputed_at | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | AT981904300000343434 | pm_exceedsWeeklyVolumeLimit_at | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | AT601904300000121212 | pm_exceedsWeeklyTransactionLimit_at | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | AT981904300002222227 | pm_insufficientFunds_at | The payment fails with an `insufficient_funds` failure code. | ### BE | Account Number | Token | Description | | ---------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | BE62510007547061 | pm_success_be | The PaymentIntent status transitions from `processing` to `succeeded`. | | BE78510007547064 | pm_successDelayed_be | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | BE68539007547034 | pm_failed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | BE51510007547065 | pm_failedDelayed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | BE08510007547063 | pm_disputed_be | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | BE90510000343434 | pm_exceedsWeeklyVolumeLimit_be | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | BE52510000121212 | pm_exceedsWeeklyTransactionLimit_be | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | BE90510002222227 | pm_insufficientFunds_be | The payment fails with an `insufficient_funds` failure code. | ### HR | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | HR7624020064583467589 | pm_success_hr | The PaymentIntent status transitions from `processing` to `succeeded`. | | HR6323600002337876649 | pm_successDelayed_hr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | HR2725000096983499248 | pm_failed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | HR6723600004878117427 | pm_failedDelayed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | HR8724840081455523553 | pm_disputed_hr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | HR7424020060000343434 | pm_exceedsWeeklyVolumeLimit_hr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | HR3624020060000121212 | pm_exceedsWeeklyTransactionLimit_hr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | HR7424020060002222227 | pm_insufficientFunds_hr | The payment fails with an `insufficient_funds` failure code. | ### EE | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | EE382200221020145685 | pm_success_ee | The PaymentIntent status transitions from `processing` to `succeeded`. | | EE222200221020145682 | pm_successDelayed_ee | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | EE762200221020145680 | pm_failed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | EE922200221020145683 | pm_failedDelayed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | EE492200221020145681 | pm_disputed_ee | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | EE672200000000343434 | pm_exceedsWeeklyVolumeLimit_ee | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | EE292200000000121212 | pm_exceedsWeeklyTransactionLimit_ee | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | EE672200000002222227 | pm_insufficientFunds_ee | The payment fails with an `insufficient_funds` failure code. | ### FI | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FI2112345600000785 | pm_success_fi | The PaymentIntent status transitions from `processing` to `succeeded`. | | FI3712345600000788 | pm_successDelayed_fi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FI9112345600000786 | pm_failed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FI1012345600000789 | pm_failedDelayed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FI6412345600000787 | pm_disputed_fi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FI6712345600343434 | pm_exceedsWeeklyVolumeLimit_fi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FI2912345600121212 | pm_exceedsWeeklyTransactionLimit_fi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FI6712345602222227 | pm_insufficientFunds_fi | The payment fails with an `insufficient_funds` failure code. | ### FR | Account Number | Token | Description | | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FR1420041010050500013M02606 | pm_success_fr | The PaymentIntent status transitions from `processing` to `succeeded`. | | FR3020041010050500013M02609 | pm_successDelayed_fr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FR8420041010050500013M02607 | pm_failed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FR7920041010050500013M02600 | pm_failedDelayed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FR5720041010050500013M02608 | pm_disputed_fr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FR9720041010050000000343434 | pm_exceedsWeeklyVolumeLimit_fr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FR5920041010050000000121212 | pm_exceedsWeeklyTransactionLimit_fr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FR9720041010050000002222227 | pm_insufficientFunds_fr | The payment fails with an `insufficient_funds` failure code. | ### DE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | DE89370400440532013000 | pm_success_de | The PaymentIntent status transitions from `processing` to `succeeded`. | | DE08370400440532013003 | pm_successDelayed_de | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | DE62370400440532013001 | pm_failed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | DE78370400440532013004 | pm_failedDelayed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | DE35370400440532013002 | pm_disputed_de | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | DE65370400440000343434 | pm_exceedsWeeklyVolumeLimit_de | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | DE27370400440000121212 | pm_exceedsWeeklyTransactionLimit_de | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | DE65370400440002222227 | pm_insufficientFunds_de | The payment fails with an `insufficient_funds` failure code. | ### GI | Account Number | Token | Description | | ----------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GI60MPFS599327643783385 | pm_success_gi | The PaymentIntent status transitions from `processing` to `succeeded`. | | GI08RRNW626436291644533 | pm_successDelayed_gi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GI41SAFA461293238477751 | pm_failed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GI50LROG772261344693297 | pm_failedDelayed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GI26KJBC361883934534696 | pm_disputed_gi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GI14NWBK000000000343434 | pm_exceedsWeeklyVolumeLimit_gi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GI73NWBK000000000121212 | pm_exceedsWeeklyTransactionLimit_gi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GI14NWBK000000002222227 | pm_insufficientFunds_gi | The payment fails with an `insufficient_funds` failure code. | ### IE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | IE29AIBK93115212345678 | pm_success_ie | The PaymentIntent status transitions from `processing` to `succeeded`. | | IE24AIBK93115212345671 | pm_successDelayed_ie | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | IE02AIBK93115212345679 | pm_failed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | IE94AIBK93115212345672 | pm_failedDelayed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | IE51AIBK93115212345670 | pm_disputed_ie | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | IE10AIBK93115200343434 | pm_exceedsWeeklyVolumeLimit_ie | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | IE69AIBK93115200121212 | pm_exceedsWeeklyTransactionLimit_ie | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | IE10AIBK93115202222227 | pm_insufficientFunds_ie | The payment fails with an `insufficient_funds` failure code. | ### LI | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LI0508800636123378777 | pm_success_li | The PaymentIntent status transitions from `processing` to `succeeded`. | | LI4408800387787111369 | pm_successDelayed_li | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LI1208800143823175626 | pm_failed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LI4908800356441975566 | pm_failedDelayed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LI7708800125525347723 | pm_disputed_li | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LI2408800000000343434 | pm_exceedsWeeklyVolumeLimit_li | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LI8308800000000121212 | pm_exceedsWeeklyTransactionLimit_li | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LI2408800000002222227 | pm_insufficientFunds_li | The payment fails with an `insufficient_funds` failure code. | ### LT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LT121000011101001000 | pm_success_lt | The PaymentIntent status transitions from `processing` to `succeeded`. | | LT281000011101001003 | pm_successDelayed_lt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LT821000011101001001 | pm_failed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LT981000011101001004 | pm_failedDelayed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LT551000011101001002 | pm_disputed_lt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LT591000000000343434 | pm_exceedsWeeklyVolumeLimit_lt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LT211000000000121212 | pm_exceedsWeeklyTransactionLimit_lt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LT591000000002222227 | pm_insufficientFunds_lt | The payment fails with an `insufficient_funds` failure code. | ### LU | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LU280019400644750000 | pm_success_lu | The PaymentIntent status transitions from `processing` to `succeeded`. | | LU440019400644750003 | pm_successDelayed_lu | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LU980019400644750001 | pm_failed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LU170019400644750004 | pm_failedDelayed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LU710019400644750002 | pm_disputed_lu | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LU900010000000343434 | pm_exceedsWeeklyVolumeLimit_lu | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LU520010000000121212 | pm_exceedsWeeklyTransactionLimit_lu | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LU900010000002222227 | pm_insufficientFunds_lu | The payment fails with an `insufficient_funds` failure code. | ### NL | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NL39RABO0300065264 | pm_success_nl | The PaymentIntent status transitions from `processing` to `succeeded`. | | NL55RABO0300065267 | pm_successDelayed_nl | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NL91ABNA0417164300 | pm_failed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NL28RABO0300065268 | pm_failedDelayed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NL82RABO0300065266 | pm_disputed_nl | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NL27RABO0000343434 | pm_exceedsWeeklyVolumeLimit_nl | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NL86RABO0000121212 | pm_exceedsWeeklyTransactionLimit_nl | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NL55RABO0300065267 | pm_insufficientFunds_nl | The payment fails with an `insufficient_funds` failure code. | ### NO | Account Number | Token | Description | | --------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NO9386011117947 | pm_success_no | The PaymentIntent status transitions from `processing` to `succeeded`. | | NO8886011117940 | pm_successDelayed_no | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NO6686011117948 | pm_failed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NO6186011117941 | pm_failedDelayed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NO3986011117949 | pm_disputed_no | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NO0586010343434 | pm_exceedsWeeklyVolumeLimit_no | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NO0586010343434 | pm_exceedsWeeklyTransactionLimit_no | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NO0586012222227 | pm_insufficientFunds_no | The payment fails with an `insufficient_funds` failure code. | ### PT | Account Number | Token | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | PT50000201231234567890154 | pm_success_pt | The PaymentIntent status transitions from `processing` to `succeeded`. | | PT66000201231234567890157 | pm_successDelayed_pt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | PT23000201231234567890155 | pm_failed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | PT39000201231234567890158 | pm_failedDelayed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | PT93000201231234567890156 | pm_disputed_pt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | PT05000201230000000343434 | pm_exceedsWeeklyVolumeLimit_pt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | PT64000201230000000121212 | pm_exceedsWeeklyTransactionLimit_pt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | PT05000201230000002222227 | pm_insufficientFunds_pt | The payment fails with an `insufficient_funds` failure code. | ### ES | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ES0700120345030000067890 | pm_success_es | The PaymentIntent status transitions from `processing` to `succeeded`. | | ES2300120345030000067893 | pm_successDelayed_es | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | ES9121000418450200051332 | pm_failed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | ES9300120345030000067894 | pm_failedDelayed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | ES5000120345030000067892 | pm_disputed_es | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | ES1700120345000000343434 | pm_exceedsWeeklyVolumeLimit_es | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | ES7600120345000000121212 | pm_exceedsWeeklyTransactionLimit_es | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | ES1700120345000002222227 | pm_insufficientFunds_es | The payment fails with an `insufficient_funds` failure code. | ### SE | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SE3550000000054910000003 | pm_success_se | The PaymentIntent status transitions from `processing` to `succeeded`. | | SE5150000000054910000006 | pm_successDelayed_se | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | SE0850000000054910000004 | pm_failed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | SE2450000000054910000007 | pm_failedDelayed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | SE7850000000054910000005 | pm_disputed_se | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | SE2850000000000000343434 | pm_exceedsWeeklyVolumeLimit_se | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | SE8750000000000000121212 | pm_exceedsWeeklyTransactionLimit_se | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | SE2850000000000002222227 | pm_insufficientFunds_se | The payment fails with an `insufficient_funds` failure code. | ### CH | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | CH9300762011623852957 | pm_success_ch | The PaymentIntent status transitions from `processing` to `succeeded`. | | CH8656663438253651553 | pm_successDelayed_ch | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | CH5362200119938136497 | pm_failed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | CH1843597160341964438 | pm_failedDelayed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | CH1260378413965193069 | pm_disputed_ch | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | CH1800762000000343434 | pm_exceedsWeeklyVolumeLimit_ch | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | CH7700762000000121212 | pm_exceedsWeeklyTransactionLimit_ch | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | CH1800762000002222227 | pm_insufficientFunds_ch | The payment fails with an `insufficient_funds` failure code. | ### GB | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GB82WEST12345698765432 | pm_success_gb | The PaymentIntent status transitions from `processing` to `succeeded`. | | GB98WEST12345698765435 | pm_successDelayed_gb | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GB55WEST12345698765433 | pm_failed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GB71WEST12345698765436 | pm_failedDelayed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GB28WEST12345698765434 | pm_disputed_gb | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GB70WEST12345600343434 | pm_exceedsWeeklyVolumeLimit_gb | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GB32WEST12345600121212 | pm_exceedsWeeklyTransactionLimit_gb | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GB70WEST12345602222227 | pm_insufficientFunds_gb | The payment fails with an `insufficient_funds` failure code. | ## Optional: Einmalige Einrichtungsgebühr hinzufügen [Serverseitig] Zusätzlich zur Übergabe von wiederkehrenden Preisen können Sie im Modus `subscription` einmalige Preise hinzufügen. Diese werden nur auf der ersten *Rechnung* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) angezeigt, die durch das Abonnement erstellt wird. Dies ist nützlich, um Einrichtungsgebühren oder andere einmalige Gebühren in Verbindung mit einem Abonnement hinzuzufügen. Sie können einem bestehenden Produkt einen einmaligen *Preis* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions) hinzufügen oder ein neues *Produkt* (Products represent items your customer can subscribe to with a Subscription. An associated Price object describes the pricing and other terms of the subscription) mit einem neuen Preis erstellen. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[0][price]"="{{RECURRING_PRICE_ID}}" \ -d "line_items[0][quantity]"=1 \ -d "line_items[1][price]"="{{ONE_TIME_PRICE_ID}}" \ -d "line_items[1][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" ``` ## Optional: Preise und Produkte inline erstellen [Serverseitig] Zusätzlich zur Übergabe vorhandener Preis-IDs können Sie bei der Erstellung der Checkout-Sitzung auch neue Preise erstellen. Definieren Sie zuerst ein *Produkt* (Products represent what your business sells—whether that's a good or a service) und erstellen Sie dann mithilfe der Produkt-ID eine Checkout-Sitzung. Achten Sie darauf, [price_data](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-price_data) mit den Details `unit_amount`, `currency` und `recurring` zu übergeben: #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \-d line_items[0][price_data][unit_amount]=5000 \ -d line_items[0][price_data][currency]=eur\ -d line_items[0][price_data][product]="{{PRODUCT_ID}}" \ -d line_items[0][price_data][recurring][interval]=month \ -d line_items[0][quantity]=1 \ -d mode=subscription \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Wenn Sie auch Produkte inline erstellen müssen, haben Sie mit [product_data](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-price_data-product_data) hierzu zu Möglichkeit: #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \-d "line_items[][price_data][currency]"=eur\ -d "line_items[][price_data][product_data][name]"=T-shirt \ -d "line_items[][price_data][unit_amount]"=2000 \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` ## Optional: Bestehende Kund/innen [Serverseitig] Wenn Sie bereits ein *Kunden* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments)-Objekt für einen Kunden oder eine Kundin erstellt haben, können Sie mit dem Argument [Kunde/Kundin](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-customer) die Kunden-ID beim Erstellen einer Bezahlvorgang übergeben. Dadurch wird sichergestellt, dass alle während der Sitzung erstellten Objekte dem richtigen Kundenobjekt zugeordnet werden. Wenn Sie eine Kunden-ID übergeben, verwendet Stripe auch die im Customer-Objekt gespeicherte E-Mail-Adresse, um das entsprechende Feld auf der Checkout-Seite vorab auszufüllen. Wenn Kund/innen ihre E-Mail-Adresse auf der Checkout-Seite ändern, wird diese nach erfolgreicher Zahlung im Customer-Objekt aktualisiert. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "customer"="{{CUSTOMER_ID}}" \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" ``` ## Optional: Kundendaten vorab angeben [Serverseitig] Wenn Sie die E-Mail-Adresse Ihrer Kundin/Ihres Kunden bereits erfasst haben und sie in einer Checkout-Sitzung vorab angeben möchten, übergeben Sie [customer_email](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-customer_email) beim Erstellen der Checkout-Sitzung. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \-d customer_email="customer@example.com" \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d mode=subscription \ -d success_url="https://example.com/success" \ ``` ## Optional: Testzeiträume handhaben [Serverseitig] Mit [trial_end](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-trial_end) oder [trial_period_days](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-trial_period_days) können Sie in der Checkout-Sitzung die Dauer des Testzeitraums angeben. In diesem Beispiel verwenden wir `trial_period_days`, um eine Checkout-Sitzung für ein Abonnement mit einem Testzeitraum von 30 Tagen zu erstellen. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "subscription_data[trial_period_days]"=30 \ -d mode=subscription \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Checkout zeigt die folgenden Informationen automatisch für Abonnements mit Testzeiträumen an: - Testzeitraum - Häufigkeit und Höhe der Zahlungen nach Ablauf des Testzeitraums Weitere Informationen zu Compliance-Anforderungen finden Sie in den Anleitungen zum [Verwalten von Compliance-Anforderungen](https://docs.stripe.com/billing/subscriptions/trials/manage-trial-compliance.md) oder in den [Support](https://support.stripe.com/questions/2020-visa-trial-subscription-requirement-changes-guide)-Anleitungen. ## Optional: Steuersätze [Serverseitig] Sie können [Steuersätze](https://docs.stripe.com/billing/taxes/tax-rates.md), (Verkäufe, USt., GST und mehr) in Checkout-Sitzungen angeben, um Steuern auf *Abonnements* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) anzuwenden. - Verwenden Sie feste Steuersätze, wenn Sie den exakten Steuersatz kennen, den Sie Ihrem Kunden/Ihrer Kundin berechnen müssen, bevor sie den Bezahlvorgang starten (wenn Sie beispielsweise nur an Kund/innen in Großbritannien verkaufen und immer 20 % Mehrwertsteuer berechnen). - Mit der *Prices* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions) API können Sie dynamische Steuersätze verwenden, wenn Sie weitere Informationen von Ihren Kund/innen benötigen (beispielsweise ihre Rechnungs- oder Versandadresse), bevor Sie den fälligen Steuersatz ermitteln. Mit dynamischen Steuersätzen erstellen Sie Steuersätze für verschiedene Regionen (beispielsweise einen Mehrwertsteuersatz von 20 % für Kund/innen in Großbritannien und einen Umsatzsteuersatz von 7,25 % für Kund/innen in Kalifornien, USA). Stripe versucht, den Standort Ihrer Kund/innen diesen Steuersätzen zuzuordnen. #### Feste Steuersätze Legen Sie [subscription_data.default_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-default_tax_rates) fest, um einen Standardsteuersatz auf ein Abonnement anzuwenden, das ohne Checkout gestartet wurde. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "subscription_data[default_tax_rates][]"="{{TAX_RATE_ID}}" \ -d mode=subscription \ -d success_url="https://example.com/success" \ ``` Sie können auch [line_items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-tax_rates) oder [subscription_data.items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-items-tax_rates) angeben, um Steuersätze auf bestimmte Pläne oder Rechnungsposten anzuwenden. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "line_items[][tax_rates][0]"="{{TAX_RATE_ID}}" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` #### Dynamische Steuersätze Übergeben Sie ein Array mit [Steuersätzen](https://docs.stripe.com/api/tax_rates/object.md) an [line_items.dynamic_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates). Für jeden Steuersatz ist ein [unterstütztes](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates) `country` erforderlich und für die USA zusätzlich ein `state`. Auf dieser Liste werden die Steuersätze mit der [Versandadresse](https://docs.stripe.com/payments/collect-addresses.md), der Rechnungsadresse oder dem Land Ihrer Kundin/Ihres Kunden abgeglichen. Die Versandadresse hat für die Bestimmung des zu berechnenden Steuersatzes Vorrang vor der Rechnungsadresse. Wenn Sie keine Versand- oder Rechnungsadresse erfassen, wird der Steuersatz anhand des Landes (und gegebenenfalls der Postleitzahl) Ihrer Kund/innen ermittelt. Wenn Sie keinen Steuersatz übergeben haben, der mit der Versand- oder Rechnungsadresse Ihres Kunden/Ihrer Kundin übereinstimmt, wird kein Steuersatz angewendet. #### Curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "line_items[][dynamic_tax_rates][]"="{{FIRST_TAX_RATE_ID}}" \ -d "line_items[][dynamic_tax_rates][]"="{{SECOND_TAX_RATE_ID}}" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` > [subscription_data.default_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-default_tax_rates) und [line_items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-tax_rates) können nicht in Verbindung mit [line_items.dynamic_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates) verwendet werden. Sie können die Datenexporte von Stripe verwenden, um die für die Überweisung erforderlichen regelmäßigen Berichte auszufüllen. Weitere Informationen finden Sie unter [Steuerberichterstattung und Überweisung](https://docs.stripe.com/billing/taxes/tax-rates.md#remittance). ## Optional: Gutscheine hinzufügen [Serverseitig] Sie können [Gutscheine](https://docs.stripe.com/billing/subscriptions/coupons.md) auf Abonnements in einer Checkout-Sitzung anwenden, indem Sie [Rabatte](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-discounts) einrichten. Diese Gutscheine überschreiben alle Gutscheine für die Kundin/den Kunden. Wenn Sie ein Abonnement für [bestehende Kundinnen/Kunden](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#handling-existing-customers) erstellen, werden alle mit der Kundin/dem Kunden verknüpften Gutscheine auf die *Rechnungen* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) des jeweiligen Abonnements angewendet. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "discounts[][coupon]"="{{COUPON_ID}}" \ -d "mode"="subscription" \ -d success_url="https://example.com/success" \ ``` ### Promo-Codes für Kund/innen hinzufügen Sie können auch [Promo-Codes](https://docs.stripe.com/billing/subscriptions/coupons.md#promotion-codes) für Kundinnen/Kunden aktivieren, indem Sie in Checkout-Sitzungen den Parameter [allow_promotion_codes](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-allow_promotion_codes) verwenden. Wenn `allow_promotion_codes` in einer Checkout-Sitzung aktiviert ist, zeigt Checkout ein Feld zum Einlösen von Promo-Codes, das Ihre Kundinnen/Kunden nutzen können. Sie können Ihre [Gutscheine](https://docs.stripe.com/billing/subscriptions/coupons.md) und Promo-Codes über das Dashboard oder die API erstellen, damit Ihre Kundinnen/Kunden sie in Checkout einlösen können. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[0][price_data][unit_amount]"=2000 \ -d "line_items[0][price_data][currency]"="eur" \ -d "line_items[0][price_data][product]={{PRODUCT_ID}}" \ -d "line_items[0][price_data][recurring][interval]=month" \ -d "line_items[0][quantity]"=1 \-d "allow_promotion_codes"="true" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` ## See also - [Ihre Integration anpassen](https://docs.stripe.com/payments/checkout/customization.md) - [Abonnements über das Kundenportal verwalten](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=checkout&ui=stripe-hosted) # Erweiterte Integration > This is a Erweiterte Integration for when platform is web and payment-ui is elements. View the full page at https://docs.stripe.com/billing/subscriptions/sepa-debit?platform=web&payment-ui=elements. Erfahren Sie, wie Sie ein *Abonnement* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis)Abonnement per SEPA-Lastschriftverfahren einrichten und abrechnen können. > Wenn Sie neue Nutzerin oder neuer Nutzer sind, verwenden Sie das [Payment Element](https://docs.stripe.com/payments/payment-element.md) anstelle von Stripe Elements, wie in diesem Leitfaden beschrieben. Das Payment Element bietet einen Low-Code-Integrationspfad mit integrierten Conversion-Optimierungen. Anleitungen finden Sie unter [Abo erstellen](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=elements). ## Produkt und Preis erstellen [Dashboard] [Produkte](https://docs.stripe.com/api/products.md) stehen für den von Ihnen angebotenen Artikel oder Dienst. [Preise](https://docs.stripe.com/api/prices.md) geben an, wie viel und wie häufig Sie für ein Produkt berechnen. Dies schließt ein, wie viel ein Produkt kostet, welche Währung Sie akzeptieren und ob es sich um eine einmalige oder eine wiederkehrende Zahlung handelt. Wenn Sie nur ein paar wenige Produkte und Preise haben, können Sie diese im Dashboard erstellen und verwalten. In diesem Leitfaden wird ein Stock-Foto-Service als Beispiel verwendet, für den Kund/innen ein monatliches Abonnement mit dem Betrag von 15 EUR berechnet werden. Um dies zu modellieren: 1. Gehen Sie zur Seite [Produkte](https://dashboard.stripe.com/products?active=true) und klicken Sie auf **Produkt erstellen**. 1. Geben Sie einen **Namen** für das Produkt an. Sie können optional eine **Beschreibung** hinzufügen und ein Bild des Produkts hochladen. 1. Wählen Sie einen **Produktsteuercode** aus. Erfahren Sie mehr über [Produktsteuercodes](https://docs.stripe.com/tax/tax-codes.md). 1. Wählen Sie **Wiederkehrend** aus. Geben Sie im Anschluss daran **15** für den Preis ein und wählen Sie **EUR** als Währung aus. 1. Wählen Sie, ob die **Steuer im Preis berücksichtigt** werden soll. Sie können entweder den Standardwert aus Ihren [Steuereinstellungen](https://dashboard.stripe.com/test/settings/tax) verwenden oder den Wert manuell festlegen. Wählen Sie in diesem Beispiel **Auto** aus. 1. Wählen Sie **Monatlich** als **Abrechnungszeitraum** aus. 1. Klicken Sie auf **Weitere Preisoptionen**. Wählen Sie dann **Pauschalpreis** als Preismodell für dieses Beispiel aus. Erfahren Sie mehr über [Pauschalpreise](https://docs.stripe.com/products-prices/pricing-models.md#flat-rate) und andere [Preismodelle](https://docs.stripe.com/products-prices/pricing-models.md). 1. Fügen Sie eine interne **Preisbeschreibung** und einen [Lookup-Schlüssel](https://docs.stripe.com/products-prices/manage-prices.md#lookup-keys) hinzu, um bestimmte Preise in Zukunft zu organisieren, abzufragen und zu aktualisieren. 1. Klicken Sie auf **Weiter**. Klicken Sie dann auf **Produkt hinzufügen**. Zeichnen Sie nach Erstellen des Produkts und des Preises die Preis-ID auf, sodass Sie diese in nachfolgenden Schritten verwenden können. Die ID wird auf der Preisseite angezeigt und sieht in etwa so aus: `price_G0FvDp6vZvdwRZ`. ## Kund/innen erstellen [Serverseitig] Ein Abonnement benötigt *einen Kunden/eine Kundin* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments), sodass Zahlungsmethoden wiederverwendet und wiederkehrende Zahlungen nachverfolgt werden können. Erstellen Sie ein `Customer`-Objekt, wenn Ihr Kunde/Ihre Kundin ein Konto bei Ihrem Unternehmen einrichtet. ```curl curl -X POST https://api.stripe.com/v1/customers \ -u "<>:" ``` ## Abonnement erstellen [Serverseitig] Erstellen Sie das *Abonnement* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) mit den Kunden- und Preis-IDs. Geben Sie clientseitig das `client_secret` entweder aus dem [confirmation_secret.client_secret](https://docs.stripe.com/api/invoices/object.md#invoice_object-confirmation_secret) der letzten Rechnung oder, für Abonnements, bei denen keine Zahlung im Voraus erforderlich ist, aus dem [pending_setup_intent](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-pending_setup_intent) zurück. Legen Sie außerdem Folgendes fest: - [payment_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-payment_behavior) auf `default_incomplete`, um die Erfassung des SEPA-Lastschriftmandats zu vereinfachen. - [save_default_payment_method](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-payment_settings-save_default_payment_method) auf `on_subscription`, um die Zahlungsmethode als Standard für das Abonnement zu speichern, wenn die Zahlung erfolgreich ist. Durch das Speichern einer Standardzahlungsmethode wird die Erfolgsquote zukünftiger Abonnementzahlungen erhöht. #### Ruby ```ruby # Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. # Find your keys at https://dashboard.stripe.com/apikeys. client = Stripe::StripeClient.new('<>') post '/create-subscription' do content_type 'application/json' data = JSON.parse(request.body.read) customer_id = cookies[:customer] price_id = data['priceId'] subscription = client.v1.subscriptions.create( customer: customer_id, items: [{ price: price_id, }], payment_behavior: 'default_incomplete', payment_settings: {save_default_payment_method: 'on_subscription'}, expand: ['latest_invoice.confirmation_secret', 'pending_setup_intent'] ) if subscription.pending_setup_intent != nil { type: 'setup', clientSecret: subscription.pending_setup_intent.client_secret }.to_json else { type: 'payment', clientSecret: subscription.latest_invoice.confirmation_secret.client_secret }.to_json end end ``` ## Angaben zur Zahlungsmethode und Mandatsbestätigung erfassen [Clientseitig] Sie können jetzt mit [Stripe Elements](https://docs.stripe.com/payments/elements.md) Zahlungsinformationen auf dem Client erfassen. Elements beinhaltet vorgefertigte Komponenten der Nutzeroberfläche zur Erfassung von Zahlungsdetails. Ein Stripe Element enthält ein iframe, dass die Zahlungsdaten über eine HTTPS-Verbindung sicher an Stripe sendet. Die Adresse der Bezahlseite muss ebenfalls mit https:// beginnen, nicht mit http://, damit Ihre Integration funktioniert. Sie können Ihre Integration ohne HTTPS testen. Dann müssen Sie das Protokoll aber [aktivieren](https://docs.stripe.com/security/guide.md#tls), bevor Sie Ihre ersten Live-Zahlungen empfangen. ### Stripe Elements einrichten #### HTML + JS Stripe Elements ist ein Feature von Stripe.js und steht damit automatisch zur Verfügung. Fügen Sie das Stripe.js-Skript auf Ihrer Zahlungsseite ein, indem Sie es in den `head` Ihrer HTML-Datei einbinden. Laden Sie Stripe.js immer direkt von js.stripe.com, um die PCI-Compliance zu gewährleisten. Fügen Sie das Skript nicht in ein Bundle ein und hosten Sie selbst keine Kopie davon. ```html Submit Payment ``` Mit dem folgenden JavaScript-Code können Sie eine Instanz von Elements auf Ihrer Zahlungsseite erstellen. Übergeben Sie die Parameter `modus` und `currency`, damit das Payment Element Details für die Zahlung per SEPA-Lastschrift einziehen kann: ```javascript const stripe = Stripe('<>'); const options = { mode: 'setup', currency: 'eur', }; const elements = stripe.elements(options); ``` ### Payment Element hinzufügen Das Payment Element muss in Ihr Zahlungsformular eingefügt werden. Erstellen Sie einen leeren DOM-Knoten (Container) mit einer eindeutigen ID in Ihrem Zahlungsformular. Das Payment Element zeigt automatisch das Formular für die SEPA-Lastschrift und den Text für die Mandatsannahme an, wenn SEPA-Lastschrift aktiviert ist: ```html
``` Wenn das Formular geladen wird, [erstellen Sie eine Instanz](https://docs.stripe.com/js/elements_object/create_element?type=payment) für das Payment Element und verbinden Sie sie mit dem Element-Container. Das Payment Element erfasst automatisch den Namen, die E-Mail-Adresse und die IBAN des Kunden/der Kundin und zeigt den Text für die Mandatssannahme an: ```javascript // Create and mount the Payment Element const paymentElement = elements.create('payment'); paymentElement.mount('#payment-element'); ``` #### React Installieren Sie [React Stripe.js](https://www.npmjs.com/package/@stripe/react-stripe-js) und den [Stripe.js-Loader](https://www.npmjs.com/package/@stripe/stripe-js) aus dem öffentlichen npm-Register: ```bash npm install --save @stripe/react-stripe-js @stripe/stripe-js ``` Übergeben Sie die Einrichtungsdetails (`mode: 'setup'`, `currency`) an den [Elements Provider](https://docs.stripe.com/sdks/stripejs-react.md#elements-provider): ```jsx import React from 'react'; import {loadStripe} from '@stripe/stripe-js'; import {Elements} from '@stripe/react-stripe-js'; import PaymentSetupForm from './PaymentSetupForm'; // Make sure to call `loadStripe` outside of a component's render to avoid // recreating the `Stripe` object on every render. const stripePromise = loadStripe('<>'); export default function App() { const options = { mode: 'setup', currency: 'eur', }; return ( ); } ``` Erstellen Sie eine Einrichtungsformularkomponente, die das [PaymentElement](https://docs.stripe.com/sdks/stripejs-react.md#element-components) rendert: ```jsx import React from 'react'; import {PaymentElement} from '@stripe/react-stripe-js'; export default function PaymentSetupForm() { return (
); } ``` ## Angaben zur Zahlungsmethode an Stripe senden [Clientseitig] Verwenden Sie [confirmSepaDebitPayment](https://docs.stripe.com/js/payment_intents/confirm_sepa_debit_payment#stripe_confirm_sepa_debit_payment-with_element) oder, für Abonnements, bei denen keine Zahlung im Voraus erfasst wird, [confirmSepaDebitSetup](https://docs.stripe.com/js/setup_intents/confirm_sepa_debit_setup#stripe_confirm_sepa_debit_setup-with_element), um das Abonnement zu bestätigen und eine [PaymentMethod](https://docs.stripe.com/api/payment_methods.md) SEPA-Lastschrift zu erstellen. Fügen Sie den Namen und die E-Mail-Adresse des Kunden/der Kundin in die Eigenschaften `payment_method.billing_details` ein. #### HTML + JS ```javascript // Define stripe with your publishable key var stripe = Stripe('pk_test_1234'); // Get the IBAN information from your element var iban = document.getElementById('iban-element'); const form = document.getElementById('payment-form'); const accountholderName = document.getElementById('accountholder-name'); const email = document.getElementById('email'); form.addEventListener('submit', async(event) => { event.preventDefault(); // Create the subscription const res = await fetch('/create-subscription', { method: 'POST', }); const {type, clientSecret} = await res.json(); const confirmIntent = type === 'setup' ? stripe.confirmSepaDebitSetup : stripe.confirmSepaDebitPayment; const {error} = await confirmIntent( clientSecret, { payment_method: { sepa_debit: iban, billing_details: { name: accountholderName.value, email: email.value, }, }, } ); }); ``` #### React ```jsx import React, {useState} from 'react'; import {useStripe, useElements, IbanElement} from '@stripe/react-stripe-js'; import IbanForm from './IbanForm'; export default function PaymentSetupForm() { const stripe = useStripe(); const elements = useElements(); const handleSubmit = async (event) => { // We don't want to let default form submission happen here, // which would refresh the page. event.preventDefault(); if (!stripe || !elements) { // Stripe.js hasn't yet loaded. // Make sure to disable form submission until Stripe.js has loaded. return; } const iban = elements.getElement(IbanElement); // For brevity, this example is using uncontrolled components for // the accountholder's name and email. In a real world app, you'd // probably want to use controlled components. // https://reactjs.org/docs/uncontrolled-components.html // https://reactjs.org/docs/forms.html#controlled-components const accountholderName = event.target['accountholder-name']; const email = event.target.email; // Create the subscription const res = await fetch('/create-subscription', { method: 'POST', }); const {type, clientSecret} = await res.json(); const confirmIntent = type === 'setup' ? stripe.confirmSepaDebitSetup : stripe.confirmSepaDebitPayment; const {error} = await confirmIntent(clientSecret, { payment_method: { sepa_debit: iban, billing_details: { name: accountholderName.value, email: email.value, }, }, }); if (res.error) { // Show error to your customer console.log(res.error.message); } else { // Show a confirmation message to your customer } }; return ( ); } ``` ## Standard-Zahlungsmethode festlegen [Serverseitig] Sie müssen Ihren Kund/innen eine gespeicherte Zahlungsmethode hinzufügen, damit zukünftige Zahlungen erfolgreich sind. Hierfür wird die zuvor erfasste Zahlungsmethode auf das übergeordnete *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments)-Objekt und als [Standard-Zahlungsmethode](https://docs.stripe.com/api/customers/update.md#update_customer-invoice_settings-default_payment_method) für *Rechnungen* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) festgelegt: ```curl curl https://api.stripe.com/v1/customers/cus_Gk0uVzT2M4xOKD \ -u "<>:" \ -d "invoice_settings[default_payment_method]=pm_1F0c9v2eZvKYlo2CJDeTrB4n" ``` ## Abonnementstatus verwalten [Clientseitig] Wenn die erste Zahlung erfolgreich war, ist der Status des *Abonnements `active` und es sind keine weiteren Maßnahmen erforderlich. Wenn Zahlungen fehlschlagen, wird der Status in den **Status des Abonnements** geändert, der in Ihren [Einstellungen für den automatischen Einzug](https://docs.stripe.com/invoicing/automatic-collection.md) konfiguriert ist. Benachrichtigen Sie die Kundin / den Kunden nach einem Fehlschlag und [wickeln Sie die Zahlung mit einer anderen Zahlungsmethode ab](https://docs.stripe.com/billing/subscriptions/overview.md#requires-payment-method).* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) ## Integration testen Sie können Ihre Integration unter Verwendung der unten aufgeführten IBANs testen. Die Zahlungsmethodendetails werden für jede IBAN erfolgreich erfasst, weisen jedoch bei Abbuchung ein unterschiedliches Verhalten auf. ##### Test-IBANs Sie können diese Test-IBANs mit dem Payment Element verwenden, um Ihre SEPA-Lastschrift-Integration zu testen. Wenn Sie einen dieser Testwerte eingeben , validiert das Payment Element automatisch die IBAN und zeigt das Mandat an. ### AT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | AT611904300234573201 | pm_success_at | The PaymentIntent status transitions from `processing` to `succeeded`. | | AT321904300235473204 | pm_successDelayed_at | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | AT861904300235473202 | pm_failed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | AT051904300235473205 | pm_failedDelayed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | AT591904300235473203 | pm_disputed_at | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | AT981904300000343434 | pm_exceedsWeeklyVolumeLimit_at | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | AT601904300000121212 | pm_exceedsWeeklyTransactionLimit_at | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | AT981904300002222227 | pm_insufficientFunds_at | The payment fails with an `insufficient_funds` failure code. | ### BE | Account Number | Token | Description | | ---------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | BE62510007547061 | pm_success_be | The PaymentIntent status transitions from `processing` to `succeeded`. | | BE78510007547064 | pm_successDelayed_be | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | BE68539007547034 | pm_failed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | BE51510007547065 | pm_failedDelayed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | BE08510007547063 | pm_disputed_be | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | BE90510000343434 | pm_exceedsWeeklyVolumeLimit_be | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | BE52510000121212 | pm_exceedsWeeklyTransactionLimit_be | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | BE90510002222227 | pm_insufficientFunds_be | The payment fails with an `insufficient_funds` failure code. | ### HR | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | HR7624020064583467589 | pm_success_hr | The PaymentIntent status transitions from `processing` to `succeeded`. | | HR6323600002337876649 | pm_successDelayed_hr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | HR2725000096983499248 | pm_failed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | HR6723600004878117427 | pm_failedDelayed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | HR8724840081455523553 | pm_disputed_hr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | HR7424020060000343434 | pm_exceedsWeeklyVolumeLimit_hr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | HR3624020060000121212 | pm_exceedsWeeklyTransactionLimit_hr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | HR7424020060002222227 | pm_insufficientFunds_hr | The payment fails with an `insufficient_funds` failure code. | ### EE | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | EE382200221020145685 | pm_success_ee | The PaymentIntent status transitions from `processing` to `succeeded`. | | EE222200221020145682 | pm_successDelayed_ee | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | EE762200221020145680 | pm_failed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | EE922200221020145683 | pm_failedDelayed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | EE492200221020145681 | pm_disputed_ee | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | EE672200000000343434 | pm_exceedsWeeklyVolumeLimit_ee | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | EE292200000000121212 | pm_exceedsWeeklyTransactionLimit_ee | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | EE672200000002222227 | pm_insufficientFunds_ee | The payment fails with an `insufficient_funds` failure code. | ### FI | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FI2112345600000785 | pm_success_fi | The PaymentIntent status transitions from `processing` to `succeeded`. | | FI3712345600000788 | pm_successDelayed_fi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FI9112345600000786 | pm_failed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FI1012345600000789 | pm_failedDelayed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FI6412345600000787 | pm_disputed_fi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FI6712345600343434 | pm_exceedsWeeklyVolumeLimit_fi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FI2912345600121212 | pm_exceedsWeeklyTransactionLimit_fi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FI6712345602222227 | pm_insufficientFunds_fi | The payment fails with an `insufficient_funds` failure code. | ### FR | Account Number | Token | Description | | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FR1420041010050500013M02606 | pm_success_fr | The PaymentIntent status transitions from `processing` to `succeeded`. | | FR3020041010050500013M02609 | pm_successDelayed_fr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FR8420041010050500013M02607 | pm_failed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FR7920041010050500013M02600 | pm_failedDelayed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FR5720041010050500013M02608 | pm_disputed_fr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FR9720041010050000000343434 | pm_exceedsWeeklyVolumeLimit_fr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FR5920041010050000000121212 | pm_exceedsWeeklyTransactionLimit_fr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FR9720041010050000002222227 | pm_insufficientFunds_fr | The payment fails with an `insufficient_funds` failure code. | ### DE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | DE89370400440532013000 | pm_success_de | The PaymentIntent status transitions from `processing` to `succeeded`. | | DE08370400440532013003 | pm_successDelayed_de | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | DE62370400440532013001 | pm_failed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | DE78370400440532013004 | pm_failedDelayed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | DE35370400440532013002 | pm_disputed_de | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | DE65370400440000343434 | pm_exceedsWeeklyVolumeLimit_de | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | DE27370400440000121212 | pm_exceedsWeeklyTransactionLimit_de | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | DE65370400440002222227 | pm_insufficientFunds_de | The payment fails with an `insufficient_funds` failure code. | ### GI | Account Number | Token | Description | | ----------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GI60MPFS599327643783385 | pm_success_gi | The PaymentIntent status transitions from `processing` to `succeeded`. | | GI08RRNW626436291644533 | pm_successDelayed_gi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GI41SAFA461293238477751 | pm_failed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GI50LROG772261344693297 | pm_failedDelayed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GI26KJBC361883934534696 | pm_disputed_gi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GI14NWBK000000000343434 | pm_exceedsWeeklyVolumeLimit_gi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GI73NWBK000000000121212 | pm_exceedsWeeklyTransactionLimit_gi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GI14NWBK000000002222227 | pm_insufficientFunds_gi | The payment fails with an `insufficient_funds` failure code. | ### IE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | IE29AIBK93115212345678 | pm_success_ie | The PaymentIntent status transitions from `processing` to `succeeded`. | | IE24AIBK93115212345671 | pm_successDelayed_ie | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | IE02AIBK93115212345679 | pm_failed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | IE94AIBK93115212345672 | pm_failedDelayed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | IE51AIBK93115212345670 | pm_disputed_ie | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | IE10AIBK93115200343434 | pm_exceedsWeeklyVolumeLimit_ie | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | IE69AIBK93115200121212 | pm_exceedsWeeklyTransactionLimit_ie | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | IE10AIBK93115202222227 | pm_insufficientFunds_ie | The payment fails with an `insufficient_funds` failure code. | ### LI | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LI0508800636123378777 | pm_success_li | The PaymentIntent status transitions from `processing` to `succeeded`. | | LI4408800387787111369 | pm_successDelayed_li | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LI1208800143823175626 | pm_failed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LI4908800356441975566 | pm_failedDelayed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LI7708800125525347723 | pm_disputed_li | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LI2408800000000343434 | pm_exceedsWeeklyVolumeLimit_li | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LI8308800000000121212 | pm_exceedsWeeklyTransactionLimit_li | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LI2408800000002222227 | pm_insufficientFunds_li | The payment fails with an `insufficient_funds` failure code. | ### LT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LT121000011101001000 | pm_success_lt | The PaymentIntent status transitions from `processing` to `succeeded`. | | LT281000011101001003 | pm_successDelayed_lt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LT821000011101001001 | pm_failed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LT981000011101001004 | pm_failedDelayed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LT551000011101001002 | pm_disputed_lt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LT591000000000343434 | pm_exceedsWeeklyVolumeLimit_lt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LT211000000000121212 | pm_exceedsWeeklyTransactionLimit_lt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LT591000000002222227 | pm_insufficientFunds_lt | The payment fails with an `insufficient_funds` failure code. | ### LU | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LU280019400644750000 | pm_success_lu | The PaymentIntent status transitions from `processing` to `succeeded`. | | LU440019400644750003 | pm_successDelayed_lu | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LU980019400644750001 | pm_failed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LU170019400644750004 | pm_failedDelayed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LU710019400644750002 | pm_disputed_lu | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LU900010000000343434 | pm_exceedsWeeklyVolumeLimit_lu | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LU520010000000121212 | pm_exceedsWeeklyTransactionLimit_lu | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LU900010000002222227 | pm_insufficientFunds_lu | The payment fails with an `insufficient_funds` failure code. | ### NL | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NL39RABO0300065264 | pm_success_nl | The PaymentIntent status transitions from `processing` to `succeeded`. | | NL55RABO0300065267 | pm_successDelayed_nl | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NL91ABNA0417164300 | pm_failed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NL28RABO0300065268 | pm_failedDelayed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NL82RABO0300065266 | pm_disputed_nl | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NL27RABO0000343434 | pm_exceedsWeeklyVolumeLimit_nl | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NL86RABO0000121212 | pm_exceedsWeeklyTransactionLimit_nl | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NL55RABO0300065267 | pm_insufficientFunds_nl | The payment fails with an `insufficient_funds` failure code. | ### NO | Account Number | Token | Description | | --------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NO9386011117947 | pm_success_no | The PaymentIntent status transitions from `processing` to `succeeded`. | | NO8886011117940 | pm_successDelayed_no | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NO6686011117948 | pm_failed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NO6186011117941 | pm_failedDelayed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NO3986011117949 | pm_disputed_no | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NO0586010343434 | pm_exceedsWeeklyVolumeLimit_no | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NO0586010343434 | pm_exceedsWeeklyTransactionLimit_no | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NO0586012222227 | pm_insufficientFunds_no | The payment fails with an `insufficient_funds` failure code. | ### PT | Account Number | Token | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | PT50000201231234567890154 | pm_success_pt | The PaymentIntent status transitions from `processing` to `succeeded`. | | PT66000201231234567890157 | pm_successDelayed_pt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | PT23000201231234567890155 | pm_failed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | PT39000201231234567890158 | pm_failedDelayed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | PT93000201231234567890156 | pm_disputed_pt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | PT05000201230000000343434 | pm_exceedsWeeklyVolumeLimit_pt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | PT64000201230000000121212 | pm_exceedsWeeklyTransactionLimit_pt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | PT05000201230000002222227 | pm_insufficientFunds_pt | The payment fails with an `insufficient_funds` failure code. | ### ES | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ES0700120345030000067890 | pm_success_es | The PaymentIntent status transitions from `processing` to `succeeded`. | | ES2300120345030000067893 | pm_successDelayed_es | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | ES9121000418450200051332 | pm_failed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | ES9300120345030000067894 | pm_failedDelayed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | ES5000120345030000067892 | pm_disputed_es | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | ES1700120345000000343434 | pm_exceedsWeeklyVolumeLimit_es | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | ES7600120345000000121212 | pm_exceedsWeeklyTransactionLimit_es | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | ES1700120345000002222227 | pm_insufficientFunds_es | The payment fails with an `insufficient_funds` failure code. | ### SE | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SE3550000000054910000003 | pm_success_se | The PaymentIntent status transitions from `processing` to `succeeded`. | | SE5150000000054910000006 | pm_successDelayed_se | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | SE0850000000054910000004 | pm_failed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | SE2450000000054910000007 | pm_failedDelayed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | SE7850000000054910000005 | pm_disputed_se | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | SE2850000000000000343434 | pm_exceedsWeeklyVolumeLimit_se | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | SE8750000000000000121212 | pm_exceedsWeeklyTransactionLimit_se | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | SE2850000000000002222227 | pm_insufficientFunds_se | The payment fails with an `insufficient_funds` failure code. | ### CH | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | CH9300762011623852957 | pm_success_ch | The PaymentIntent status transitions from `processing` to `succeeded`. | | CH8656663438253651553 | pm_successDelayed_ch | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | CH5362200119938136497 | pm_failed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | CH1843597160341964438 | pm_failedDelayed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | CH1260378413965193069 | pm_disputed_ch | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | CH1800762000000343434 | pm_exceedsWeeklyVolumeLimit_ch | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | CH7700762000000121212 | pm_exceedsWeeklyTransactionLimit_ch | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | CH1800762000002222227 | pm_insufficientFunds_ch | The payment fails with an `insufficient_funds` failure code. | ### GB | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GB82WEST12345698765432 | pm_success_gb | The PaymentIntent status transitions from `processing` to `succeeded`. | | GB98WEST12345698765435 | pm_successDelayed_gb | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GB55WEST12345698765433 | pm_failed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GB71WEST12345698765436 | pm_failedDelayed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GB28WEST12345698765434 | pm_disputed_gb | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GB70WEST12345600343434 | pm_exceedsWeeklyVolumeLimit_gb | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GB32WEST12345600121212 | pm_exceedsWeeklyTransactionLimit_gb | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GB70WEST12345602222227 | pm_insufficientFunds_gb | The payment fails with an `insufficient_funds` failure code. | ## Optional: Legen Sie den Rechnungsstellungszeitraum fest Wenn Sie ein Abonnement erstellen, wird der Abrechnungszyklus automatisch auf Standard eingestellt. Wenn ein Kunde/eine Kundin beispielsweise am 7. September einen monatlichen Plan abonniert, wird dies danach am 7. jedes Monats in Rechnung gestellt. Manche Unternehmen legen ihren Abrechnungszyklus lieber selbst fest, damit sie ihren Kundinnen/Kunden jeden Zyklus zur selben Zeit in Rechnung stellen können. Das Argument [Abrechnungszyklusanker](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-billing_cycle_anchor) macht dies möglich. ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d billing_cycle_anchor=1611008505 ``` Durch manuelles Festlegen des Abrechnungszyklus wird dem Kunden/der Kundin automatisch ein anteilsmäßig verrechneter Betrag für die Zeit zwischen der Erstellung des Abonnements und dem Abrechnungszyklusanker berechnet. Wenn Sie Kundinnen/Kunden diesen Zeitraum nicht in Rechnung stellen möchten, können Sie das Argument [proration_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-proration_behavior) auf `none` setzen. Sie können den Abrechnungszyklusanker auch mit [Testzeiträumen](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#trial-periods) kombinieren, um Nutzern und Nutzerinnen kostenlosen Zugriff auf Ihr Produkt zu gewähren und ihnen dann einen anteiligen Betrag zu berechnen. ## Optional: Abonnement-Testphasen Kostenlose Testphasen ermöglichen Kundinnen/Kunden, Ihr Produkt für einen begrenzten Zeitraum ohne Gebühren zu nutzen. Die Nutzung kostenloser Testphasen unterscheidet sich vom Festlegen bdes [proration_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-proration_behavior) auf `none`, da Sie die Dauer der kostenlosen Testphase anpassen können. Übergeben Sie einen Zeitstempel im [Ablauf der Testphase](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-trial_end), um den Testzeitraum festzulegen. #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d trial_end=1610403705 ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d trial_end=1610403705 ``` Sie können einen [Abrechnungszyklusanker](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#billing-cycle) auch mit einer kostenlosen Testphase kombinieren. Angenommen, es ist der 15. September und Sie möchten Ihrem Kunden/Ihrer Kundin eine kostenlose siebentägige Testphase schenken und am 1. Oktober mit dem normalen Abrechnungszyklus starten. Sie können den Ablauf der kostenlosen Testphase auf den 22. September festlegen und den Abrechnungszyklusanker auf den 1. Oktober. So kann der Kunde/die Kundin sieben Tage lang eine kostenlose Testversion nutzen und für den Zeitraum zwischen Ablauf der Testphase und dem 1. Oktober wird ein anteilsmäßig verrechneter Betrag berechnet. Am 1. Oktober berechnen Sie dem Kunden/der Kundin dann den normalen Abonnementbetrag für seinen/ihren ersten vollen Abrechnungszyklus. ## Optional: SEPA-Lastschriftzahlungen mit anderen Zahlungsmethoden erstellen > Dieses Dokument bezieht sich auf eine *Legacy* (Technology that's no longer recommended)-Funktion (das `idealBank` Element), die in der aktuellen Version von Stripe.js nicht mehr verfügbar ist. Wir empfehlen die Verwendung des [Payment Elements](https://docs.stripe.com/payments/payment-element.md), einer UI-Komponente für das Web, die über 40 Zahlungsmethoden akzeptiert, Eingaben validiert und Fehler behandelt. Sie können SEPA-Lastschriftzahlungen auch über andere Zahlungsmethoden wie [Bancontact](https://docs.stripe.com/payments/bancontact/set-up-payment.md) und [iDEAL](https://docs.stripe.com/payments/ideal/set-up-payment.md) erstellen. Die Verwendung dieser Zahlungsmethoden erfordert einige zusätzliche Schritte. Für iDEAL: 1. Verwenden Sie ein [idealBank Element](https://docs.stripe.com/js/elements_object/create_element?type=idealBank), um Zahlungsinformationen zu erfassen. 1. Bestätigen Sie das Abonnement mit [confirmIdealPayment](https://docs.stripe.com/js/payment_intents/confirm_ideal_payment) oder bei Abonnements, bei denen keine Zahlung im Voraus erfasst wird, mit [confirmIdealSetup](https://docs.stripe.com/js/setup_intents/confirm_ideal_setup). 1. [Lassen Sie die Zahlungsmethoden der Kundin/des Kunden auflisten](https://docs.stripe.com/api/payment_methods/customer_list.md), um nach der Zahlungsmethode SEPA-Lastschrift zu suchen. Legen Sie sie anschließend als [Standard-Zahlungsmethode](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#set-default-payment-method) der Kundin/des Kunden fest. Für Bancontact ersetzen Sie: - `confirmIdealPayment` für [confirmBancontactPayment](https://docs.stripe.com/js/payment_intents/confirm_bancontact_payment) - `confirmIdealSetup` für [confirmBancontactSetup](https://docs.stripe.com/js/setup_intents/confirm_bancontact_setup)