mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-06 23:58:35 +00:00
Document trials without a payment method
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.
This commit is contained in:
11 files changed
+151
-3
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?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';
|
||||
}
|
||||
Reference in new issue
Block a user