Create payment link for new registered user

Hello bubblers,
Can someone help me in creating a stripe payment link for new registered user using Stripe Payment Link API?

Here is a documentation url : Create a payment link | Stripe API Reference

Basically what we want is that when a new user is registered he will get a email with a payment link and from that payment link he will subscribe himself and will redirect to the platform and then he can’t use that payment link.