I have integrated Paypal ExpressCheckout using NVP in a site but I only receive information related to the transaction via GetExpressCheckoutDetails but not the billing information such as buyer name, address. I have used the v65 of the API and PHP. Is there a way to get/retrieve buyer information when they login to PayPal and pay using ExpressCheckout ?
An example how I used it.
$nvpstr = '&TOKEN=' . $token . etc ...
$resArray = hash_call("GetExpressCheckoutDetails", $nvpstr);
print_r($resArray);
But I receive only transaction details without buyer information.
Only the shipping information would be returned if you are requiring shipping. The billing information is not returned. If you are needing the billing information returned, you would need to contact PayPal Business Support or your account manager if you have one and request the option to be turned on to return the billing information. In addition to having this turned on, you also need to pass over the variable REQBILLINGADDRESS in your SetExpressCheckout API call and you need to set the value to “1”.
REQBILLINGADDRESS
(Optional) Is 1 or 0. The value 1 indicates that you require that the buyer’s billing address on file with PayPal be returned. Setting this element will return BILLTONAME, STREET, STREET2, CITY, STATE, ZIP, and COUNTRYCODE.
Limitations: One character.
Related
Our company has clients who have PayPal accounts. We also have their PayPal emails.
The issue is how to get client's business_name and country by providing its PayPal email?
Is it possible to make it using PayPal API?
Thanks in advance!
When a user makes a payment (Set up standard payments), you'll receive their shipping address country code as part of the v2/checkout/orders capture response.
If you need to the country of a PayPal account separately from such a payment capture's shipping address, then you might need to implement Log in with PayPal requesting the scope address, and have the user log in.
However, the capture response might also have a "payer" object with the billing account country (which can be different from the shipping country in some cases).
I have question that if a customer changes the shipping address when he makes the payment in Paypal (Paypal IPN ,Paypal express) from the entered address(in our merchant website) , how can we do add the extra values or decrease the amount based on the new shipping address .
Thanks
Az
You could:
Implement the Instant Update API, or;
Obtain shipping data by calling GetExpressCheckoutDetails as described in this flow (#5).
Hth...
I have set up the sales tax in my account but Paypal always return 0%
Here are the SetExpressCheckout parameters
This is the result
TOKEN=EC-03E58022CK445842R
&TIMESTAMP=2015-01-10T20:48:57Z
&CORRELATIONID=b875a01d29414
&ACK=Success
&VERSION=119
&BUILD=14726230
Then the user is redirected to Paypal and enter its billing address.
On the callback url, I do the GetExpressCheckoutDetails with the following parameters
and the result is
TOKEN=EC-5TF12550CK165913F
&BILLINGAGREEMENTACCEPTEDSTATUS=0
&CHECKOUTSTATUS=PaymentActionNotInitiated
&TIMESTAMP=2015-01-10T21:04:05Z
&CORRELATIONID=7eefa2e1b98b5
&ACK=Success
&VERSION=119
&BUILD=14726230
&EMAIL=something#hotmail.com
&PAYERID=WDUJK7NL59J7A&PAYERSTATUS=verified
&FIRSTNAME=SandboxTest
&LASTNAME=Account
&COUNTRYCODE=CA
&CURRENCYCODE=CAD
&AMT=59.99
&SHIPPINGAMT=0.00
&HANDLINGAMT=0.00
&TAXAMT=0.00
&INSURANCEAMT=0.00
&SHIPDISCAMT=0.00
&PAYMENTREQUEST_0_CURRENCYCODE=CAD
&PAYMENTREQUEST_0_AMT=59.99
&PAYMENTREQUEST_0_SHIPPINGAMT=0.00
&PAYMENTREQUEST_0_HANDLINGAMT=0.00
&PAYMENTREQUEST_0_TAXAMT=0.00
&PAYMENTREQUEST_0_INSURANCEAMT=0.00
&PAYMENTREQUEST_0_SHIPDISCAMT=0.00
&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
&PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS=None
&PAYMENTREQUESTINFO_0_ERRORCODE=0
so the sales tax are not calculated
and from the documentation it looks like you have to set up the taxes yourself SetExpressCheckout with L_PAYMENTREQUEST_n_TAXAMTm
but how are you supposed to know how much to charge if you don't know where the user lives?
After you call SetExpressCheckout and redirect the user to PayPal, they'll login and review the order, choose their shipping, etc. and are then sent back to the ReturnURL you specified.
That is where you'll call GetExpressCheckoutDetails like you did, which would typically contain the payer's shipping address. You could then calculate shipping and tax based on that address and display a final review page to your buyer which includes all of the totals.
Note that your GECD response doesn't include an address because you specified NOSHIPPING=1 in your SEC request.
When they submit that final review you'll call DoExpressCheckoutPayment, and make sure to include the shipping and tax parameters in that request in order for them to be included in the payment that gets processed at that point.
If you want to skip your own final review page, you can setup a callback service where PayPal's review page will POST the payer details to a script you have sitting on your server, which can then take the address, calculate shipping and tax values, and return them back to PayPal's review page, which populates a drop down on that page so the payer can choose from the rates your script returns. They call this the Instant Update API.
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.
I would like to get User billing information from PayPal so that I can compare the billing information the user would have inputted in my site with those which the user has in PayPal.
I did try to access this information using the response which PayPal gives using
getECResponse.GetExpressCheckoutDetailsResponseDetails.PayerInfo.Address.Street1
but these are all null.
Is this possible? I am using Express checkout and these are digital goods so the user would not be inputting any shipping details himself.
Thanks
GetExpressCheckoutDetails returns Billing information if you had passed REQBILLINGADDRESS = 1 in SetExpressCheckout. Before doing this, you will need to get billing address enabled by contacting PayPal customer/Business Support.
A sample GETEC response :
TOKEN=EC-6CW49061US796703X
BILLINGAGREEMENTACCEPTEDSTATUS=0
CHECKOUTSTATUS=PaymentActionNotInitiated
TIMESTAMP=2014-11-06T09:29:59Z
CORRELATIONID=ac2e59af86d9c
ACK=Success
VERSION=109.0
BUILD=13630372
EMAIL=vimalbuyer#gmail.com
PAYERID=ZK5AUW8MWY9CW
PAYERSTATUS=verified
FIRSTNAME=vimalbuyer
LASTNAME=ravichandran
COUNTRYCODE=US
SHIPTONAME=J Smith
SHIPTOSTREET=1 Main St
SHIPTOCITY=San Jose
SHIPTOSTATE=CA
SHIPTOZIP=95131
SHIPTOCOUNTRYCODE=US
SHIPTOCOUNTRYNAME=United States
BILLINGNAME=vimalbuyer ravichandran //Billing information starts
STREET=1 Main St
CITY=San Jose
STATE=CA
ZIP=95131
COUNTRY=US
COUNTRYNAME=United States
ADDRESSID=PayPal
ADDRESSSTATUS=Confirmed
CURRENCYCODE=USD
AMT=0.01
SHIPPINGAMT=0.00
HANDLINGAMT=0.00
TAXAMT=0.00
INSURANCEAMT=0.00
SHIPDISCAMT=0.00
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_AMT=0.01
PAYMENTREQUEST_0_SHIPPINGAMT=0.00
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_TAXAMT=0.00
PAYMENTREQUEST_0_INSURANCEAMT=0.00
PAYMENTREQUEST_0_SHIPDISCAMT=0.00
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
PAYMENTREQUEST_0_SHIPTONAME=J Smith
PAYMENTREQUEST_0_SHIPTOSTREET=1 Main St
PAYMENTREQUEST_0_SHIPTOCITY=San Jose
PAYMENTREQUEST_0_SHIPTOSTATE=CA
PAYMENTREQUEST_0_SHIPTOZIP=95131
PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US
PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME=United States
PAYMENTREQUEST_0_ADDRESSSTATUS=Confirmed
PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS=None
PAYMENTREQUESTINFO_0_ERRORCODE=0
The GetExpressCheckoutDetails API call is only going to return the shipping information, and you are correct that if the buyer is going through the flow for digital goods there are not going to be any shipping details. There are a few different ways to get some of the information that you are wanting.
You could use the AddressVerify API. This would need to be enabled on your account by PayPal. The AddressVerify API operation confirms whether a postal address and postal code match those of the specified PayPal account holder.
You could use PayPal Identity (formerly PayPal Access), to get some of the user's information back. The basic account information that will be returned is:
Name (First, Last or Full)
Email Address
Address (Street Address, City, State, Postal Code, Country)
Phone Number
Another option, is you can contact PayPal and request a feature to be enabled to return the billing address for Express Checkout. This is feature that does need to be approved before it can be turned on as well.