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:
To learn more, see Extend Stripe Billing with custom discount logic.