Search code examples
paypalpaypal-sandboxpaypal-rest-sdk

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


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.


Solution

  • 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.