I'm struggling to decide between Paypal NVP and REST APIs.
The REST API seems to be newer and better but I can't find a way to get customer details after a transaction occured.
Basically I want to set up a billing plan for recurring payments and then get customer details via API so they do not have to enter them through my website.
Paypal Express checkout seems to be what I should use here.
The NVP API offers a GetExpressCheckoutDetails method to get these details.
I didn't find something similar for the REST API.
Since the REST API seems to go through Express Checkout as well there should be a solution.
How can I get customer details after activating the billing agreement?
I ran into this same problem a month ago and after reading the docs, there's currently no way to accomplish this with the REST API. If there is a way, it's not documented.
The only way I found to do this is with the NVP API and possibly the SOAP API. The NVP API will give you back most of the fields that you want but if you've stored custom fields for a transaction, it will only give you 3 of the custom fields but not all of them (weird).
I haven't tried the NVP method GetExpressCheckoutDetails but I have used the GetTransactionDetails method. It will give you back the transaction details. It returns a text block that you must parse. Each field is URL encoded and separated by an ampersand. Here's an example in PHP:
Here's the formatted return body:
Warning:
This only applies if you're storing custom fields in a PayPal transaction.
PayPal's NVP API only returns up to 3 custom fields for a transaction, even though you can store up to 7 custom fields in a transaction. Even crazier, one of the custom fields it returns is a duplicate of the second custom field. At least that's the case when I try to retrieve a custom fields from a transaction.