#dineshkumar

1 messages ยท Page 1 of 1 (latest)

sturdy owlBOT
barren cedar
#

Hi Dingbot

silent quiver
#

๐Ÿ‘‹ happy to help

barren cedar
#

sripes whether allow or not onetime payment with trial?

silent quiver
#

would you mind moving your other messages to this thread please?

barren cedar
#

sure

silent quiver
#

if you're creating a Checkout Session for creating subscriptions you need to pass Mode = "subscription"

barren cedar
#

my code:

var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string>
{
"card",
},
LineItems = lineItems,
Mode = "payment",
SubscriptionData = new SessionSubscriptionDataOptions
{
TrialPeriodDays = 7,
},
SuccessUrl =
$"{redirectURL}?status=successful-payment&session_id={{CHECKOUT_SESSION_ID}}",
CancelUrl =
$"{redirectURL}?status=cancel-payment&session_id={{CHECKOUT_SESSION_ID}}",
};

#

my requirement was below, we can do it in stripe

#

get 7 days for free (7-Day Trial Period) before their card gets charged the one-time fee

silent quiver
#

no that's not possible without creating a subscription

#

even if the subscription is for only one cycle

barren cedar
#

i can't clear only one cycle

#

could you please explain with example

silent quiver
#

you need to first create the checkout session the way you're doing it but with Mode="subscription"

#

then you will listen to checkout.session.completed webhook event

#

which means that the subscription won't get renewed

barren cedar
#

I find it hard to believe we can't do a trial period when someone wants to pay for the year up front.

silent quiver
#

you can do it in your system

#

and once the trial is done you can send them the checkout session

barren cedar
#

please give reference for above

silent quiver
#

I mean you can setup the trial period on your end

#

and don't involve Stripe in the trial