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
Versionierung
Änderungsprotokoll
    Übersicht
    Basilikum
    Acacia
    Vorherige Versionen
Aktualisieren Sie Ihre API-Version
Ihre SDK-Version aktualisieren
Essentials
SDKs
API
Tests
Stripe-CLI
Beispiel-Projekte
Tools
Workbench
Entwickler-Dashboard
Stripe Shell
Stripe für Visual Studio Code
Funktionen
Arbeitsabläufe
Ereignisziele
Stripe-StatuswarnungenHochgeladene Dateien
KI-Lösungen
Agent-Toolkit
Model Context Protocol
Sicherheit und Datenschutz
Sicherheit
Stripebot-Webcrawler
Datenschutz
Extend Stripe
Erstellen Sie Stripe-Apps
Verwenden Sie Apps von Stripe
Partner
Partner-Ecosystem
Partner-Zertifizierung
StartseiteEntwicklerressourcenChangelogBasil2025-04-30.preview

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.

Adds support for script couponsÖffentliche Vorschau

What’s new

You can now customize business logic on Stripe using scripts. With scripts, you can define custom logic expressed as code that runs on our infrastructure, extending Stripe’s core functionality. Use scripts to customize business login on Stripe logic using Stripe’s Coupon object. Currently, you can only associate a script with this specific type of object.

Custom discounting logic

To support the customization of discounting logic with scripts, we added a new script parameter on the Coupon create method. With this new parameter, you can configure a Coupon to use the custom discounting logic.

The script parameter has two required nested parameters: id and configuration. id is the script ID and configuration is any input parameter to the script.

The following example illustrates how to set up a coupon that gives the buyer 20% off up to 100 USD:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/coupons \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d duration=once \ -d name="My coupon" \ -d "script[id]"=bfsimpl_61S9T2y7zlKu9YlG116S8pZoN2SQpuwOX348dhXM0R9c \ -d "script[configuration][max_discount_amount][amount]"=10000 \ -d "script[configuration][max_discount_amount][currency]"=usd \ -d "script[configuration][discount_percent]"=20

To learn more, see Extend Stripe Billing with custom discount logic.

Changes

ParameterÄndernRessourcen oder Endpoints
scriptHinzugefügt
Coupon#createCoupon

Upgrade

  1. View your current API version in Workbench.
  2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
    • If you don’t use an SDK, update your API requests to include Stripe-Version: 2025-04-30.preview
  3. Upgrade the API version used for webhook endpoints.
  4. Test your integration against the new version.
  5. If you use Connect, test your Connect integration.
  6. In Workbench, perform the upgrade. You can roll back the version for 72 hours.

Learn more about Stripe API upgrades.

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