#makspiechota_checkout-async-payment-methods
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/1229741020523008062
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
I receive some instruction in my test environment that I need to listen for
payment_intentevent.
Where do you see it?
I called createCheckoutSession api, and I entered the link it returned
then I selected ideal method and it redirected me to this instruction page
Ok, I understand what it's refering to. Basically, payments like iDEAL or bank transfers take long time to process. Even after the Checkout Session is completed, the payment goes into the processing state. Only after some time, you will receive payment_intent.succeeded or payment_intent.payment_failed webhook events that will indicate if the pending payment went through successfully.
So yes, it's better to listen to those events too (mainly payment_intent.payment_failed) to ensure you stop providing your service to the customer if the payment ends up failing.
hm
so unless I get this event
I should treat the user as paid?
what is the recommended approach here?
what I do actually, every time the user signs in to the system I am calling stripe api to see if their subscription is active. Would it be set to inactive in stripe itself, if the payment fails?
It depends on the nature of your business. If it's a SaaS, you could probably start serving them immediaately, and block access if the payment fails.
If you're shipping goods, maybe it's worth waiting for the payment to settle.
I think it should be in active state. I recommend you to try in test mode.
it will be in active state even if the payment fails?
No, then it will be in past_due
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
sure, can you elaborate?
so will it be active or inactive?
based on that user parameter read directly from stripe I am granting (or not) access to my system
It'll be past_due, as explained here:
Payment on the latest finalized invoice either failed or wasn’t attempted. The subscription continues to create invoices. Your subscription settings determine the subscription’s next state. If the invoice is still unpaid after all Smart Retries have been attempted, you can configure the subscription to move to canceled, unpaid, or leave it as past_due. To move the subscription to active, pay the most recent invoice before its due date.
makspiechota_checkout-async-payment-methods