#popplestones
1 messages · Page 1 of 1 (latest)
If the payment record is created when payment intent is created, your system will know that the customer is in the process of making payment. It will be helpful to prevent creating duplicated payment intent since your system knows one has been created
Then if they close the browser in between those steps there will be a payment on our backend which has not been made
What is the issue here? Customer can come back to make the payment with the same intent again later
I guess the accounts seeing the customer has paid there invoice and no longer have any outstanding amount.
This will be up to your business requirements how you would like to handle and keep track of the payment process. When the payment record is created, you may have your own internal status of the payment record and only change the status to paid if the payment is made successfully
would i store the payment intent from stripe on my backend against that pending payment, so nexttime i can re-use it? when they come back?
If the amount is the same, yes, you can re-use the same payment intent
If the amount is different, then a separate payment intent should be used
Alternatively, you can only create payment record after the payment is successful
This is totally up to your business decision and requirements
ok, I think i got it.
I notice that when stripe redirect's to the redirect_url provided it passes these in the query string:
'payment_intent', 'payment_intent_client_secret', 'redirect_status'
I can't find in the docs what these values could be, is redirect_status the status of the payment?
redirect_status is not the payment status. When returning to the redirect_url, payment_intent_client_secret can be used to retrieve the payment intent and get its status
You may refer to the guide here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment