Weiter zum Inhalt
Konto erstellen
oder
anmelden
Das Logo der Stripe-Dokumentation
/
KI fragen
Konto erstellen
Anmelden
Jetzt starten
Zahlungen
Umsatz
Plattformen und Marktplätze
Geldmanagement
Entwicklerressourcen
Übersicht
Billing
ÜbersichtÜber die Billing APIs
Abonnements
Invoicing
Nutzungsbasierte Abrechnung
    Nutzungsbasierte Abrechnung auswählen
      Produkte und Preise verwenden
        Abrechnungskonfiguration verwalten
        Mengen anpassen
      Preislisten verwenden
    Nutzung für Abrechnungszwecke aufzeichnen
    Abrechnungsgutschriften anbieten
    Nutzung überwachen
    Nutzungsbasierte Preismodelle
Angebote
Kundenverwaltung
Billing with other products
Umsatzsicherung
Automatisierungen
Umsatzrealisierung
Integration testen
Steuer
Übersicht
Use Stripe tax
Manage compliance
Berichte
Übersicht
Bericht auswählen
Configure reports
API für Berichte
Berichte für mehrere Konten
Umsatzrealisierung
Daten
ÜbersichtSchema
Nutzerspezifische Berichte
Data Pipeline
Datenverwaltung
StartseiteUmsatzUsage-based billingChoose a usage-based billing setupUse products and prices

Notiz

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

Manage your usage-based billing setup

Learn how to handle billing-related tasks for your usage-based billing model.

After you create your usage-based billing model, you can modify different parts of your billing setup. For example, you can update a subscription item’s price during a billing cycle, backdate a subscription to include usage in the next invoice, or cancel usage-based subscriptions.

Update prices mid-cycle

You can update a subscription item’s price during a billing cycle.

However, limitations apply when switching from one meter price to another.

On future invoices, we reflect only usage that occurs after the update. For example, say you have a monthly subscription that you switch from price A to price B on January 16. At the end of the month, the invoice includes usage from January 16 to January 31 at price B. Usage from January 1 to January 16 isn’t billed.

An exception exists if you use billing thresholds and have a threshold invoice already generated at the old price. For example, say you generate a threshold invoice on January 10 using price A. That threshold invoice is still charged to the customer. At the end of the month, the invoice includes usage from January 16 to January 31 at price B. The earlier threshold invoice doesn’t offset any usage for this end-of-month invoice.

Similar restrictions apply if you add a new subscription item with a billing meter price in the middle of the subscription cycle. For example, say you add a new subscription item with price C on January 16. At the end of the month, the invoice includes usage from January 16 to January 31 at price C for that subscription item.

To capture previously reported usage when changing prices, choose one of these options:

  • Report the aggregated usage again to capture it in the cycle on the new price.
  • Reset the billing_cycle_anchor parameter to now, applying the old price to previously reported usage.

These workarounds address the current limitation.

To update the price for a subscription item:

Command Line
cURL
curl https://api.stripe.com/v1/subscription_items/{{SUBSCRIPTION_ITEM_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d price={{NEW_PRICE_ID}}

To delete a subscription item:

Command Line
cURL
curl -X DELETE https://api.stripe.com/v1/subscription_items/{{SUBSCRIPTION_ITEM_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

After deletion, the invoice doesn’t reflect any usage from that item.

Create a backdated subscription

You can record usage for a customer even before creating a subscription for them. After recording usage for a customer, use the backdate_start_date to create a subscription before the first report.

This allows you to include usage in the next subscription invoice.

Command Line
cURL
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer={{CUSTOMER_ID}} \ -d "items[0][price]"={{PRICE_ID}} \ -d backdate_start_date=1710000000

Cancel usage-based subscriptions

With usage-based billing, the bill the customer pays varies based on consumption during the billing cycle. When changing the billing cycle results in a subscription interval ending early, you charge the customer for the usage accrued during the shortened billing cycle.

Notiz

We don’t support proration with usage-based billing.

You can’t reactivate canceled subscriptions. Instead, you can collect updated billing information from your customer, update their default payment method, and create a new subscription with their existing customer record.

If you use cancel_at_period_end to schedule the cancellation of a subscription, you can reactivate the subscription at any time up to the end of the period. To do so, update cancel_at_period_end to false.

For subscriptions that cancel at the end of the period, the final invoice at the end of the cycle includes metered usage from the last billing cycle.

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