How do i connect a third party paypal account by using email id and send invoice on behalf - paypal

i am integrating Paypal with our platform for multiple merchants. Here a Merchant just need to enter his Paypal email Id, and here i just need to validate his First Name and Last Name to be matched with Paypal account and the entered names in our platform.
And then i should be able to send invoices On behalf of Merchant from our platform to their customers.
I am looking for below.
1) How do i validate Merchant email id with paypal
2) After validating how do i be able to send Invoices on behalf of
Merchants.
FYI, I just find similar setup functionality here. i would need something like this.

You can validate the merchant PayPal account using GetVerifiedStatus API:
requestEnvelope.errorLanguage = en_US&emailAddress = teatemail#test.com&&firstName = Firstname&lastName = Lastname&matchCriteria = NAME
After validation, you can get the API call permissions after that you can run the invoicing API for sending invoices.

After a long time analyzing, i was able to find that to have above functionality , i have to use AdaptivePayment method of Paypal for generating invoice from our side and sending a link for payment and invoice page to customer in mail.
But before doing this i have to validate email id of merchant using GetVerifiedStatus API as mentioned by PP_Punna.
So the following steps are needed to :
1) Validate merchant email Id with first name and last name using GetVerifiedStatus API.
2) Generate a PayKey using AdaptivePayment method (PAY) by mentioning the receiver email id as Merchant email id which was validated in first step and create url like
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=[PayKey]. and put it under paypal button.

Related

How to use X-PAYPAL-AUTHORIZATION to handle payments on behalf of other users in PayPal with out knowing user's email address

We are developing a marketplace webapp which charges customers on behalf of sellers.
After reading through PayPal's API documentation, the only solution seems to be the Permissions service.
According to the documentation. After retrieving the access token and token secrete of a seller through the RequestPermissions call, we generated X-PAYPAL-AUTHORIZATION header to initiate an express checkout payment id. However, the payment id generated is associated with our PayPal account instead of the seller's, which is not the anticipated behavior.
Adding seller's email address in the SUBJECT field as noted in PayPal Name-Value Pair API Basics does work, but as we tested it, it has nothing to do with the access token and token secrete.
The problem with the SUBJECT field is that we cannot make sure the seller's email address with us is the one PayPal have on file.
The GetBasicPersonalData permission seems to be able to get a valid email address, but that needs to be pre-approved by PayPal. In fact, I have come across many websites that does not require this permission but able to initiate payment on behalf of other users. Is there a way to just get sellers' email or PayPal Id without GetBasicPersonalData permission? We don't actually need any other personal data except email or PayPal Id.

How could I get merchant account id of paypal?

I'm trying to use the PayPal Adaptive Payments Payment API. I am trying to test the API with my own email address, but I get an error specifying the sender by email. I'm wondering how to determine my own account ID to try that way?
I'm referring to the account id here: https://developer.paypal.com/docs/classic/api/adaptive-payments/PaymentDetails_API_Operation/
I get the error: "The email address smithd98#gmail.com is invalid. It may not be registered in PayPal's system yet" when trying to pay by my email. When I log in with PayPal my email address is correct. My account is verified with a bank account, credit card, and debit card connected.
You can get your PayPal account ID by logging into your PayPal account and looking in your profile, or you can also get it via the GetPalDetails API.

Get PayPal Profile ID with user's email address

I'm wondering if it's possible to look up a PayPal Recurring Payments Profile ID using the email address used to create the profile.
I'm aware of the GetRecurringPaymentsProfileDetails API call, but this call requires the Profile ID as a parameter. I need to look up the Profile ID with only the email address.
Looks like you can use TransactionSearch API to search for the required information using buyer's email address. You will get the associated ProfileIDs/Transaction ids for the buyer.
The response variable is L_TRANSACTIONIDn

Get the email of my PayPal customer

I need to read the email of the buyer that has completed a transaction on my eCommerce site. Paypal does send me an email of notification, but does not contain the email of the buyer (Instead, it returns just the transaction-id - which takes me to my account.)
I was looking through the PayPal for Developer API, but I can't find an example to get this level of detail. Is this even possible to retrieve, and if so, how?
Paypal ipn returns the address. When you post to PayPal, they request an address by default. (Source)
no_shipping =2 is the prompt for requiring an address.

ipn using customer business pp account

my ipn works perfectly its setup under our business PayPal account. our asp.net website is being used by multiple customers with their own members, unique by their login. as of now the cart writes to our database with the orders and sets a status code that gets changed to 'completed' via the ipn call/authentication from PayPal using our PayPal email. now, a couple want to use their own PayPal accounts, non-for profits, so in order for this to work as previously described what changes in the post variables?
ex of what i need: a member of our customer logs in to our website, adds items to their cart and chooses PayPal payment option. it writes to our database as an 'in-process' order. it opens our customer PayPal account to complete the payments then once complete it calls our ipn setup under our PayPal account and redirects back to the custom page.
again, everything is already working great just want to call their own PayPal account instead of ours w/o needing to have them setup the ipn settings under their account, but use the ipn setup under our PayPal account. members see their own customer PayPal account billing theme and the money is in their account not ours. is this possible?
do we send the ipn location url and our customer PayPal account info in the post variables?
thanks for any help
As far as processing the payment on their PayPal account, you can go about this 2 different ways. You can either use their API credentials and pass those over in the API call and the payment will be processed on their account. Second option would be to have them grant 3rd party API permissions to your API to be able to process transactions on their account. Then you would just pass over your API credentials in your API call and also pass over their email address of their PayPal account in the variable "SUBJECT". This will then process the payment on their account.
As for still haveing the IPN POST sent to your script, you will just need to pass over the IPN URL in the API call. When pass it over in the API call, it will override whatever is set in the account. For example, if you are using NVP the variable would be "NOTIFYURL".