'Validate uniqueness of email/phone on Stripe checkout page

After Customers checkout from Stripe payment link, We use their filled email and phone to create record/signup in our database on confirmation page. Our business requires that email and phone should be unique. Therefore when some customers enter duplicate detail (email/phone) it causes issues.

Is there a way that we can enforce email address and phone to be unique? Either through some Stripe web hook or configuration on Stripe end.

One way I know I can use is to create my own checkout session with pre-validated email/phone but I want to avoid that.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source