#Andrew Samir-paymentintents
1 messages · Page 1 of 1 (latest)
Hello there
I integrate subscription for user with a custom integration using payment intents and cron job that check the renewal date and when the renewal date is expired it renew the subscription by making payment intent and confirm: True
Okay ?
and i was about 90% of the project done
And it worked well
and the subscription was renewed and everything was fine
But i was thinking now what if when i running my cronjob and make a payment intent with confirm:True what if the card needs authentication
and i didnt figure out any solution for that how can i make the user authenticate from only the backend using my cronjob
Just to confirm - you're not using Stripe's Subscriptions at all right, you're building this purely on Payment Intents?
Yes
And i really dont know what to do this will make me crazy and wanted to suicide 😂
If a payment needs authentication, your only option is to bring your user back on-session to have them complete the authentication process. One approach you could take is to send an email to your customer if their payment needs additional action to complete
Is there a way to send this email using stripe ? and what should be included in that email ?
There isn't a way to send those emails through Stripe because you're just using Payment Intents and we expect you to handle all of that yourself - if you were using Stripe Subscriptions then we have functionality you can enable to send these emails, but not for one-off Payment Intents
So i have to send email with my own integration ?
but what shall i send in this email ?
I wanted to use subscription but after its too late
Yes, you'd have to send the email yourself - it's up to you what you include in this email, but at a minimum it needs to direct your user to your integration so they can complete the authentication process
i kinda dont imagine how that will authenticate the user ... isnt there a url or anything for the authentication ?
You need to direct them to a URL for your own site/integration and then implement what's necessary for them to complete authentication
Mmmmm thats complicated i thought there were a url for the bank that handle the authentication for me and i just wiill redirect users to this url
You're talking about this (https://stripe.com/docs/payments/3d-secure?platform=web#manual-redirect) right? So yes, that's technically an option but I think it's safer for you to implement something on your end to act as the middle man and faciliate the redirect in case those redirect URLs expire for some reason
The point is i dont imagine what i need to authenticate him so thats why i need to just redirect that user to what the bank authentication is
So is that a valid option to just send the url came from next_action. redirect_to_url respone in that reference ?
To authenticate them you'd build a UI that would call confirmCardPayment (https://stripe.com/docs/js/payment_intents/confirm_card_payment) which will begin the authentication process
But i think this will need the client_secret which is not available when sending the email right ?
Hi, jumping in here as karbi needed to steps away. Catching up now
Hey there
Yes, to confirm the Payment Intent, you would need to pass the client secret. You can retrieve this from the Payment Intent: https://stripe.com/docs/api/payment_intents/retrieve
Is that simple to make when sending email to the user ?
It depends but the simplest way would be to to use Stripe Subscriptions where you can enable this functionality.