Make your first Express Checkout call

This topic describes how to make your first Express Checkout API call.

Make your first call

Use one of these formats to make calls:

Request method Request format Response format
HTTP POST Name-value pair (NVP) Name-value pair (NVP)

Note: PayPal no longer supports the HTTP GET method for the classic NVP/SOAP APIs. For more information, including the planned change date, see Discontinue Use of GET Method for Classic APIs Microsite. Ensure that by the specified date your API requests only use the HTTP POST method.

The following example SetExpressCheckout call shows you how to construct an API call.

Get the endpoint for the service and environment that you want to access. For example, to access the NVP service in the PayPal sandbox:

To access the SOAP endpoint, see API endpoints.

Each API call specifies authentication credentials, as follows:

// Sandbox API credentials for the API caller account
USER= // user id
PWD= // password
SIGNATURE= // signature
VERSION= // the release version of the API

You can pass parameters in an API call. For example, you can pass the following parameters to the SetExpressCheckout operation:

PAYMENTREQUEST_0_AMT= // payment amount
PAYMENTREQUEST_0_PAYMENTACTION= // type of transaction
PAYMENTREQUEST_0_CURRENCYCODE= // payment currency code
returnUrl= // redirect URL for use if the customer authorizes payment
cancelUrl= // redirect URL for use if the customer does not authorize payment

To make the call, see Try It!

Try it!

If the curl command is not found on your computer, download the free cURL executable.

This example shows a SetExpressCheckout Sandbox call that initiates a $10 payment. The combination of the USER, PWD, and SIGNATURE values identifies the app that makes the API call.

Copy and run this cURL command:

curl \
-s \
--insecure \
-d \
-d PWD=1255077037 \
-d SIGNATURE=Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf \
-d METHOD=SetExpressCheckout \
-d VERSION=78 \
-d cancelUrl= \
-d returnUrl=

A similar response should be returned:

// a reference to the payment transaction that can be processed on
// additional data about the API call

For readability, this response is split.

If the call fails with ACK=Failure, review the error message details. Then, try the call again.

Next steps

For detailed integration steps, see the Express Checkout with In-Context integration guide.

Additional information