创建折扣
为您的账户创建一个折扣。
授权
Send your API key as a bearer token: Authorization: Bearer <api_key>. A test mode key starts with dodo_test_, for example dodo_test_AbCd1234EfGh5678.<secret>. A live mode key starts with dodo_live_. Use a test mode key on test.dodopayments.com and a live mode key on live.dodopayments.com. Keys from before these tags have no tag and operate as before.
请求体
Request body for creating a discount.
code is optional; if not provided, we generate a random 16-char code.
Per-currency options (flat deduction / percentage cap + minimum subtotal).
Checkout uses the row for the currency the buyer pays in. For any other
currency it converts the default row. Required for flat codes (must
include a resolvable default); optional per-currency caps for
percentage codes. Per-row invariants are checked in
normalize_currency_options, not via #[validate(nested)].
响应
Created discount