#aki_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234834198187999243
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
You can List the Checkout Sessions based on status: https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-status
how do i implement this in my code that i provided here? sry im kinda confused. if im using ListAsync() i just get my expired sesions.
What programming language are you using?
c#. i working in a .net backend.
i used the stripe shell to test the listing call and i could use optional parameter to filter my sessions. to list e.g. completed sessions "stripe checkout sessions list --status="complete".
but i cant really find anything that shows me how to implement this into my backend .code.
right now im getting my list with this code (same as in api docs to list sessions) :
var service = new SessionService();
StripeList<Session> sessions = await service.ListAsync();
You can see an example in Stripe API reference, in your preferred language: https://docs.stripe.com/api/checkout/sessions/list
now its my bad totally
You just need to replace Limit = 3 with Status = "open" or Status = "complete".
i set wrong options-
you are so right . i think it wil work now
i think i did this before : Status == "complete" - so an error occured
can i also filter for two status? to list open and complete session? or do i have to make two listing calls . one for open session and one for complete sessions
You will need to make 2 calls.
thank you.
Happy to help.