New to the community? Welcome! Please read our Community Rules and Guidelines
Hi, it is my understanding you would like to assign a "login" name or "alias" to the buyer's email which are paying on your website (via the REST API PayPal button). If so then you need to build your own database/logic as PayPal needs the payerID / email to recognize the user and process the payment. You can't forward to PayPal a customized login / alias name instead of the email they insert on the PayPal checkout page.
Im using the subscription API to create the subscription not the button. Should I set the email in PayerInfo and then use that to identify the user to the back end system? I looked at the PayerInfo and i cant find a user specified ID or login name field.
Hello still dont get this. Im creating a plan and an agreement. When they sign up it redirects to ExecuteAgreement.php and the agreement is exceuted using the passed token. I still dont know how to tie the billing agreement to a user id. I know I can get the email, but I cant set that, it returns the email on the account. Their email for paypal may not match the one they gave me in which case i cant identify who they are. The only solution i can think of is to use a session vairable to identify the user in ExecuteAgreement. Is that the accepted solution or is there some other way to set and retrieve the user id passed from creating the plan to executing it?
Hi, in the API you have tie together into the request to create a new subscription v1/billing/subscriptions the subscriber with a specific plan.
You can check this link
We can see that into the request you pass a plan_id and the subscriber object where you can set the email as well:
"full_name": "John Doe"
"address_line_1": "2211 N First Street",