#suzz1911
1 messages · Page 1 of 1 (latest)
var session = await service.CreateAsync(options);
var service = new SessionService(_client);
var session = await service.GetAsync(sessionId);
You need to expand the line_items field: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
More on expanding: https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
var service = new SessionService(_client);
service.AddExpand("data.line_items");
var session = await service.GetAsync(sessionId);
Cannot resolve symbol 'AddExpand'
use like this right?
i used the expand object like this
var options = new SubscriptionListOptions
{
Customer = customerId,
Status = "all"
};
options.AddExpand("data.default_payment_method");
and is working
how to use in this case
var service = new SessionService(_client);
service.AddExpand("data.line_items");
var session = await service.GetAsync(sessionId);
You're missing:
var options = new SessionGetOptions()
options.AddExpand('line_items')
var service = new SessionService()
var options = new SessionGetOptions()
options.AddExpand('line_items')
service.Get(id, options);
Sure!
i set the cancellation like this in dashboard
and right after i cancelled the production, the status of the subscription in the subscription api is not set to cancelled
var options = new SubscriptionListOptions { Customer = customerId, Status = "all" }; options.AddExpand("data.default_payment_method"); var service = new SubscriptionService(); var subscriptions = service.List(options)
Sure, that's because you have the 'cancel at end of billing period' option set
So we update the Subscription's cancel_at_period_end field and it's automatically cancelled on the period_end timestamp
how will i set the kow that the subscription will get cancelled at the end of the perios. now the status is active same as before its get cancelled
You'd check cancel_at_period_end
ok