Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal SOAP and NVP

I am new to PayPal and i want to know which is batter way to implement PayPal, SOAP or NVP API.

And what is the major difference between these two???

like image 813
Waheed Avatar asked Oct 05 '09 04:10

Waheed


People also ask

What is NVP soap?

The NVP API is a lightweight alternative to the PayPal SOAP API and provides access to the same set of functionality as the SOAP API.

What are PayPal API credentials?

PayPal API credentials (Username, Password, and Signature) are necessary if you want to integrate your forms with PayPal Pro. These are separate details from your PayPal login information.

What is PayPal REST API?

The PayPal REST API is organized around transaction workflows, including: orders, payments, subscriptions, invoicing, and disputes. Try out our REST APIs with test credentials on Postman. The API uses standard verbs and returns HTTP response codes and JSON-encoded responses.


2 Answers

I would recommend using the NVP (Name-value pair, basically POST with data) API over the SOAP API. NVP should be significantly lighter weight than SOAP. There are a few questions already on SO that complain about SOAP. I just was trying to figure out which to use and came upon those. Hope that helps.

Also, here's how PayPal describes the NVP API:

The PayPal Name-Value Pair API (NVP API) enables you to leverage the functionality of the PayPal API by simply sending an HTTP request to PayPal and specifying request parameters using name-value pairs. The NVP API is a lightweight alternative to the PayPal SOAP API and provides access to the same set of functionality as the SOAP API.

Emphasis my own.

like image 114
9 revs Avatar answered Sep 22 '22 12:09

9 revs


It's better to use the PayPal SOAP API (as i have completely implemented this). donut is correct in saying that NVP is lightweight. But there are 2 main advantages of using SOAP:

  1. The chance of error is much more the the NVP, as it's object oriented.
  2. And if you are doing programming for at least about one year then you will feel more comfortable with SOAP.

I recommend SOAP over NVP, but it also depends upon usage.

like image 26
Waheed Avatar answered Sep 20 '22 12:09

Waheed