2007

Table Of Contents
Name-Value Pair API Developer Guide and Reference April 2007 15
Overview
Technical Details
You may see sample code where these values are stored in an HTML form.
The following is an example of what you should NOT do in production:
<form method=post
action=https://api-3t.sandbox.paypal.com/nvp>
<!-- UNPROTECTED VALUES. DO NOT USE IN PRODUCTION! -->
<input type=hidden name=USER value=xxxxxx.paypal.com>
<input type=hidden name=PWD value=abcdefg>
<input type=hidden name=SIGNATURE value=xxxxxxxxxxxxxxx>
...
</form>
API Parameters
The request body must contain the name of the API method in the METHOD parameter. In
addition, each method has required and optional parameters:
METHOD=methodName&requiredAndOptionalParameters
All API methods and their parameters are detailed in Appendix A, “NVP API Method and
Field Reference.” Examples of use are in Chapter 2, “Accepting PayPal in Express Checkout,”
and Chapter 3, “Back-Office Administration.”
Response Format
A response from the PayPal servers is a URL-encoded name-value pair string, just like the
request, except it has the following general format.
Each response includes the ACK field. If the ACK field’s value is Success or
SuccessWithWarning, you should process the API response fields. In a successful response,
you can ignore all fields up to and including the BUILD field. The important fields begin after
the BUILD field.
The possible successful response fields for each method are detailed in Appendix A, “NVP
API Method and Field Reference.” What you do with the fields depends on the particular API
method you are calling, such as filling-in a FORM for your user, updating your database, and
so on.
TABLE 1.5 General Format of a Successful Response
Success
Response
Fields
ACK=Success&TIMESTAMP=date/timeOfResponse
&CORRELATIONID=debuggingToken&VERSION=2.300000
&BUILD=buildNumber
The examples show the
successful response header fields
like this:
[successResponseFields]
API Response
Fields
&NAME1=value1&NAME2=value2&NAME3=value3&...