【发布时间】:2021-07-20 11:51:16
【问题描述】:
我正在通过 C# SDK 创建一个 Stripe Checkout 会话,并希望知道该会话的有效期。
var options = new SessionCreateOptions
{
SuccessUrl = "https://example.com/success.html?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "https://example.com/canceled.html",
PaymentMethodTypes = new List<string>
{
"card",
},
Mode = "subscription",
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
Price = req.PriceId,
Quantity = 1,
},
},
};
var service = new SessionService();
var session = await service.CreateAsync(options);
【问题讨论】:
标签: c# stripe-payments