#sl-tech_code
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/1295643231174004787
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I think this is it: req_VA8bMDkHi7cTfP
OK. This checkout session was already completed and therefore expired. You should create a new checkout session for new payments
ok! how do I create a new checkout session for every request?
from my code I can't see where I can create a new session, I thought I already did that..
https://docs.stripe.com/no-code/payment-links maybe you want to try our no-code solution? A PaymentLink will automatically create a checkout session when your customer opens it
yes I looked into links, but I couldn't figure out how to defined different amount for each request? is this possible?
If you want to use dynamic amount, then checkout sessions API is more suitable for you. But that requires you to write some code
yes I write code. this is for a webshop I'm developing. but where in my code should I create the new checkout session? or what do I need to do different?
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=stripe-hosted we have a very comprehsive guide for checkout session, can I suggest you to go through it?
I've done that, and my code is equal to the demo code. shouldn't this create a new session?
SessionService service = new SessionService();
Session session = service.Create(opt);
Yes, you should put some logs in your code and see why it didn't get executed and return your customer a new checkout session URL.
hmm. it looks like it's a cache issue. when I clear the cache for localhost it works, but else it redirects to Stripe before running the code that creates a new session
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
I got it to work by sending in a unique Guid for each call to the Stripe controller in my project