#repark_ben
1 messages · Page 1 of 1 (latest)
Thank you orakaro for assisting me today!
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
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?
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
alright, thank you
is there any downside to storing all that information in the pi meta data?
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