From 2d527e23ee79050498d5772f3bbd37405a3cc596 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Thu, 17 Oct 2024 11:35:58 +0530 Subject: [PATCH] feat: Configure free trial without payment details --- src/controllers/admin/subscriptions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controllers/admin/subscriptions.ts b/src/controllers/admin/subscriptions.ts index e91cd6ea..47422d2a 100644 --- a/src/controllers/admin/subscriptions.ts +++ b/src/controllers/admin/subscriptions.ts @@ -198,8 +198,14 @@ export class SubscriptionController { success_url: successURL, cancel_url: cancelURL, subscription_data: { + trial_settings: { + end_behavior: { + missing_payment_method: 'cancel', + }, + }, trial_period_days: trialPeriodDays, }, + payment_method_collection: 'if_required', }, { idempotencyKey,