#repark_ben

1 messages · Page 1 of 1 (latest)

red forgeBOT
drifting sapphire
#

Thank you orakaro for assisting me today!

sharp vector
#

Yes you are correct that there is case of customer losing connection or simply accidentally close their tab

#

Better approach would be rely on Webhook event

#

When you receive payment_intent.succeeded on webhook endpoint, perform the step 4 of creating booking

drifting sapphire
#

So you are saying:
payment, and then rely on the webhook to create the booking on the server?

#

but how would the client then know, about the booking being created without actively checking?

#

and should be put all the data we'd need for the booking creation inside the meta-data of the paymentintent?

sharp vector
#

Yes putting the data needed in metadata, or saving those data into your database and save a linked ID on metadata would work

#

and for the client, yeah you would want to sync the status from your backend to see if booking was created. When you display any client page, ask your backend to check the latest status

drifting sapphire
#

alright, thank you

#

is there any downside to storing all that information in the pi meta data?

sharp vector
#

Nothing if you can distinguish them. I think best practice would still be only saving an Id and store the other information on your own database