Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to validate PayPal account?

I want to integrate paypal to my website and ask users to enter paypal account for commission pay out. How can I check if their account exists on paypal? I prefer NOT to send them $0.01 or it's the only way to check account?

It should validate it automatically while user sign ups to the website.

like image 894
Andrey Avatar asked Jul 12 '10 13:07

Andrey


People also ask

Do you need to verify PayPal account?

You can use a PayPal account without verifying it to receive payments. Without verification though, you'll be limited in how much money you can withdraw from the account to your bank account (how much this limit is depends on the policy applicable to your country).

How does PayPal verify 2022?

In the Wallets section, go to the Banks and Cards section to verify the card. Select your bank account and the card you want to verify. Check the bank statement and card activity on PayPal's interface. Enter the four-digit code and click confirm.


3 Answers

GetVerifiedStatus should do the trick. You'll have to pass the email address and the name of the person and it will then return whether or not their account has been verified.

If they don't have a PayPal account you'll get an error back that says "Cannot determine PayPal Account status."

Here's a sample of the request and response I just ran on the sandbox for a verified PayPal account...

<?xml version="1.0" encoding="utf-8"?>
<GetVerifiedStatusRequest xmlns="http://svcs.paypal.com/types/ap">
  <requestEnvelope xmlns="">
    <detailLevel>ReturnAll</detailLevel>
    <errorLanguage>en_US</errorLanguage>
  </requestEnvelope>
  <emailAddress xmlns="">[email protected]</emailAddress>
  <matchCriteria xmlns="">NAME</matchCriteria>
  <firstName xmlns="">Drew</firstName>
  <lastName xmlns="">Angell</lastName>
</GetVerifiedStatusRequest>

<?xml version='1.0' encoding='UTF-8'?>
<ns2:GetVerifiedStatusResponse xmlns:ns2="http://svcs.paypal.com/types/aa">
  <responseEnvelope>
    <timestamp>2013-01-05T00:07:01.729-08:00</timestamp>
    <ack>Success</ack>
    <correlationId>3fecb3e1f2011</correlationId>
    <build>4055066</build>
  </responseEnvelope>
  <accountStatus>VERIFIED</accountStatus>
  <userInfo>
    <emailAddress>[email protected]</emailAddress>
    <accountType>BUSINESS</accountType>
    <accountId>E7BTGVXBFSUAU</accountId>
    <name>
      <salutation></salutation>
      <firstName>Drew</firstName>
      <middleName></middleName>
      <lastName>Angell</lastName>
      <suffix></suffix>
    </name>
    <businessName>Drew Angell's Test Store</businessName>
  </userInfo>
</ns2:GetVerifiedStatusResponse>

And here's a sample of a request and response where the PayPal account doesn't exist...

<?xml version="1.0" encoding="utf-8"?>
<GetVerifiedStatusRequest xmlns="http://svcs.paypal.com/types/ap">
  <requestEnvelope xmlns="">
    <detailLevel>ReturnAll</detailLevel>
    <errorLanguage>en_US</errorLanguage>
  </requestEnvelope>
  <emailAddress xmlns="">[email protected]</emailAddress>
  <matchCriteria xmlns="">NAME</matchCriteria>
  <firstName xmlns="">Drew</firstName>
  <lastName xmlns="">Angell</lastName>
</GetVerifiedStatusRequest>

<?xml version='1.0' encoding='UTF-8'?>
<ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/aa">
  <responseEnvelope>
    <timestamp>2013-01-05T00:08:28.581-08:00</timestamp>
    <ack>Failure</ack>
    <correlationId>43364ce704211</correlationId>
    <build>4055066</build>
  </responseEnvelope>
  <error>
    <errorId>580023</errorId>
    <domain>PLATFORM</domain>
    <subdomain>Application</subdomain>
    <severity>Error</severity>
    <category>Application</category>
    <message>Cannot determine PayPal Account status</message>
  </error>
</ns3:FaultMessage>
like image 177
Drew Angell Avatar answered Oct 14 '22 03:10

Drew Angell


you can ask them to enter the email address they use in paypal. and if they dont have an account on paypal, you can still send them funds to any email they enter. Paypal will take care of getting them to create an paypal account with that email id and show them their funds.

all you may have to ensure is that they enter the correct email id.. maybe an email address verification step could do the trick.

like image 20
Kinjal Dixit Avatar answered Oct 14 '22 04:10

Kinjal Dixit


With Java (we can do something like using adaptiveaccountssdk)

<dependency>
    <groupId>com.paypal.sdk</groupId>
    <artifactId>adaptiveaccountssdk</artifactId>
    <version>LATEST</version>
</dependency>

...

Map<String, String> sdkConfig = new HashMap<>();
sdkConfig.put("mode", "sandbox/live");
sdkConfig.put("acct1.UserName", "");
sdkConfig.put("acct1.Password", ""));
sdkConfig.put("acct1.Signature", ""));
sdkConfig.put("acct1.AppId", ""));

GetVerifiedStatusRequest request = new GetVerifiedStatusRequest();
AccountIdentifierType accountIdentifierType = new AccountIdentifierType();
accountIdentifierType.setEmailAddress(accountEmail);
request.setAccountIdentifier(accountIdentifierType);
request.setMatchCriteria("NONE");
AdaptiveAccountsService aas = new AdaptiveAccountsService(sdkConfig);
GetVerifiedStatusResponse response = aas.getVerifiedStatus(request);
String status = response.getAccountStatus();

.....

like image 25
sojin Avatar answered Oct 14 '22 05:10

sojin