mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-04 22:59:41 +00:00
Discount subscriptions per billed period
discount (label, percent_off or amount_off, duration once, repeating or forever) when creating subscriptions and per subscription of checkout sessions, the discount field on subscriptions and the subscription.discount_ended event type.
This commit is contained in:
10 files changed
+104
-2
No files matched your search
@@ -27,7 +27,8 @@ class Subscriptions extends BaseCollection
|
||||
* ends_at: null|string,
|
||||
* trial_days?: null|int,
|
||||
* trial_ends_at?: null|string,
|
||||
* trial_once?: bool
|
||||
* trial_once?: bool,
|
||||
* discount?: null|array{label: string, percent_off?: float|string, amount_off?: float|string, duration: string, duration_in_periods?: int}
|
||||
* } $attributes The subscription data:
|
||||
* - group: The group (optional)
|
||||
* - name: The name
|
||||
@@ -42,6 +43,7 @@ class Subscriptions extends BaseCollection
|
||||
* - trial_days: A free trial of 1–365 days from the user's confirmation on (optional)
|
||||
* - trial_ends_at: Or a fixed end of the free trial (ISO 8601, in the future; optional)
|
||||
* - trial_once: Refuse the trial if the user already had one with the app in the group (optional)
|
||||
* - discount: A discount per billed period, see AppSubscriptions::create() (optional)
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function create(array $attributes): Subscription
|
||||
|
||||
Reference in new issue
Block a user