'How to add trial to stripe checkout using ASP.NET Core
What is that syntax for adding a trial to asp core 3.1 using stripe checkout? I'm trying to assign TrialPeriodDays to SubscriptionData for a 7 day free trial.
// Checkout Session
var options = new SessionCreateOptions
{
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
Price = "price_1KJSMXC...",
Quantity = 1,
},
},
// I believe I need to assign the trial to SubscriptionData below
SubscriptionData = { },
Mode = "subscription",
SuccessUrl = "https://example.com/Success",
CancelUrl = "https://example.com/Cancel",
};
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
