I want to create a way to dynamically generate paypal links where the receiver is already set by their email address (and amount). I know that paypal has the "paypal.me" feature for this, but to use it the user has to create it by themselves first. Example: https://paypal.com/sendMoney?receiver=paul@gmail.com&amount=10$
You cannot use the "send money" flow for this, but you can make a regular PayPal payment go to any destination email. Via https://www.paypal.com/buttons , create a Buy Now button and in Step 2 uncheck the option to save the button at PayPal. After clicking to create, switch to the "Email" tab. This results in a link like the following:
Which can be simplified to:
The above satisfies your request for a link. If you want a nice looking button and in-context flow that doesn't redirect away from your site, start with a regular PayPal Checkout integration and add a payee
parameter in the createOrder payload, as documented here.