Integration Guide

Table Of Contents
Express Checkout Integration Guide October 2009 31
PayPal Name-Value Pair API Basics
Creating an NVP Request
3
A method specifies the PayPal operation you want to execute. Each method is associated with
a version number; together, the method and version defines the exact behavior of the API
operation. Typically, the behavior of an API operation does not change between versions;
however, you should carefully retest your code whenever you change a version.
To specify a method and version number
1. Choose the PayPal API operation you want to use.
METHOD=
operation
2. Choose the appropriate version.
In most cases, you will want to use the latest version of the API operation.
VERSION=
version_number
Setting the API operation and version using PHP
function PPHttpPost($methodName_, $nvpStr_) {
...
$version = urlencode('52.0'); // NVPRequest for submitting to server
$nvpreq ="METHOD=$methodName_&VERSION=$version...$nvpStr_";
...
}
Specifying an API Credential
You must specify API credentials in each request to execute a PayPal API operation.
When you execute a PayPal API operation, you use credentials, such as a signature, to
authenticate that you are requesting the API operation. The following diagram shows the API
credentials part of an NVP request: