#popplestones

1 messages · Page 1 of 1 (latest)

whole ibexBOT
dense cove
#

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

hard gazelle
#

Then if they close the browser in between those steps there will be a payment on our backend which has not been made

dense cove
#

What is the issue here? Customer can come back to make the payment with the same intent again later

hard gazelle
#

I guess the accounts seeing the customer has paid there invoice and no longer have any outstanding amount.

dense cove
#

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

hard gazelle
#

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?

dense cove
#

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

hard gazelle
#

ok, I think i got it.

hard gazelle
#

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?

dense cove
#

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