#dineshkumar
1 messages · Page 1 of 1 (latest)
hi
Not sure I understand 100% your ask here, can you please give an example ?
var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string>
{
CardPaymentMethodType,
},
LineItems = lineItems,
Mode = "Subscription",
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}}",
};
we need to add here subscription cancel at after 1 year
Thanks for your clarification
that's not supported with Checkout Session, here what you can set in Subscription Data:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data
then how we achieve this following requirement cancel subscription at after 1 year
You need to manage this by your integration, after 1 year cancel it using API. or Update the created subscription using API and set cancel_at with a timestamp after 1 year:
https://stripe.com/docs/api/subscriptions/update#update_subscription-cancel_at