mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-06 23:58:35 +00:00
trial_payment_method (TrialPaymentMethod::REQUIRED, the default, or ::OPTIONAL) on app subscriptions, subscriptions and checkout sessions: an optional trial can be confirmed without a payment method and is cancelled at its end if there is still none (cancellation_reason and subscription.cancelled data.reason CancellationReason::TRIAL_ENDED_WITHOUT_PAYMENT_METHOD). subscription.trial_will_end carries data.payment_method_missing.
21 lines
678 B
PHP
21 lines
678 B
PHP
<?php
|
|
|
|
namespace Anikeen\Id\Enums;
|
|
|
|
/**
|
|
* `trial_payment_method` of a subscription with a free trial: whether the user needs a payment
|
|
* method to confirm it. Null on subscriptions without a trial.
|
|
*/
|
|
class TrialPaymentMethod
|
|
{
|
|
/** A payment method is needed to confirm the trial (the default). */
|
|
const REQUIRED = 'required';
|
|
|
|
/**
|
|
* The trial can be confirmed without a payment method (if nothing else has to be paid). If the
|
|
* user still has none when the trial ends, the subscription is cancelled then instead of billed
|
|
* (`cancellation_reason` CancellationReason::TRIAL_ENDED_WITHOUT_PAYMENT_METHOD).
|
|
*/
|
|
const OPTIONAL = 'optional';
|
|
}
|