#Marius_Stefanel
1 messages ยท Page 1 of 1 (latest)
Hello! What's up?
So, Is there any way to get all checkout session paymanth intent ids with stripe api?
๐
You can list all Checkout Sessions: https://stripe.com/docs/api/checkout/sessions/list
And expand the payment_intent in the results: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
and can i delete one of the chekout session using stripe api?
No. What are you trying to do exactly?
what does it mean var options = new Session List Options { Limit = 3, };?
The limit set there is how many Checkout Sessions you'll get per API request. I recommend you use auto pagination with a limit of 25 per request to start with and then adjust if needed: https://stripe.com/docs/api/pagination/auto
k
and, how can i get if the checout is succes??
You'd check the status of the session: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
(or payment_status, depending on the use case and what you want to know)
I use this code:
StripeConfiguration.ApiKey = "sk_test_key";
var options = new SessionListOptions
{
Limit = 100,
Status = "completed",
};
var service = new SessionService();
StripeList<Session> sessions = service.List(options);
foreach (Session session in sessions)
{
Console.WriteLine(session.Id);
Console.WriteLine(session.PaymentIntent);
}
and is an error at Status
That it does not exist in the Session List Options
Does checkout session will disappear? I mean, they are not deleted automatically?
status is not a parameter for the list endpoint
its an attribute you'd inspect on the results
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
with this cod i get the error:nhandled exception rendering component: Cannot wait on monitors on this runtime.
System.PlatformNotSupportedException: Cannot wait on monitors on this runtime.
That doesn't appear to be a Stripe error
so, how can i get all succes checkouts id?
You list as you're doing and then filter by the status in your own code if that's what you wanted