Express Checkout
Integration Overview
This guide provides you with the basic information and best practices guidelines you'll need to integrate Express Checkout on your website. It is intended for you, the merchant, to help you create an online shopping experience that can increase sales and customer loyalty by building a checkout process that is fast, easy and intuitive.
Contents
What is Express Checkout?
How Express Checkout works
Designing an Optimal Checkout Flow
Integration Use Cases
Obtaining an Express Checkout button and PayPal Mark
Use Case 1: A Sale Transaction
Setting Up the Express Checkout Transaction
Obtaining Express Checkout Transaction Details
Completing the Express Checkout Transaction
Use Case 2: Auth / Capture
Use Case Example for Authorization
Use Case 3: Refunds / Voids
Managing Response Codes
Testing your Integration
Going Live with your Express Checkout Integration
Sample Code
Which Interface Am I Using?
Express Checkout Sample Code
Documentation
Online References
Note: For comprehensive integration information, see the Express Checkout Integration Guide.
What is Express Checkout?
Express Checkout provides a seamless checkout experience via an API-based integration for buyers who want to use their PayPal accounts or Credit Cards (even without logging into a PayPal account). Buyers select their payment methods and shipping information on PayPal, then return to your website to finalize their purchases. Express Checkout allows your buyers to complete transactions in very few steps. It eliminates one of the major causes of checkout abandonment by giving buyers all the transaction details at once, including order details, shipping options and tax totals. Use Express Checkout to complement your existing payment solutions and:
- Accept payments from buyers using credit cards or from any PayPal account.
- Reduce checkout abandonment by eliminating the need for customers to reenter personal information
- including shipping, billing and payment information.
- Keep customers on your site after they complete their transactions.
How Express Checkout Works
Buyers use Express Checkout to pay you on PayPal's secure site and return to your site to complete the transaction. When buyers complete their purchases, your website makes an API call (unseen by the customer) to PayPal to request payment. The payment transaction is initiated and PayPal sends buyers email receipts for the payments.

Express Checkout API Calls Flow
The following diagram shows the Express Checkout API operations that are called during a typical payment transaction. For integration details, see Use case 1: A Sale transaction.

Designing an Optimal Checkout Flow
PayPal has identified specific elements which can help you optimize the checkout experience and get the most out of using PayPal Express Checkout. These elements were identified through years of A/B testing, industry research and qualitative studies with merchants and buyers. Implementing these guidelines can:
- Result in higher sales conversions.
- Create an online shopping experience that can increase sales and customer loyalty.
- Build a checkout process that is fast, easy and intuitive.
The following easy steps can help you optimize your checkout flow and increase conversion by improving your buyer experience.
-
Show what payment options you offer on your Home and Product Details pages. Buyers start thinking about how they will pay for their purchases before they see the final payment page. Placing payment messaging early and often allows buyers to make that payment choice quicker which can increase the likelihood of a purchase.

-
Add Express Checkout Shortcut to the Shopping cart page to the right or left, top or bottom of your checkout button.

The Checkout with PayPal button should:
- Always be clickable.
- Be placed right below or next to each of your own cart's checkout buttons.
- Appear before your website collects any billing or shipping details, and before any other payment.
- Be aligned vertically or horizontally with your own buttons.
- Include a What is PayPal? link.
When the buyer clicks the PayPal button:
- Call the
SetExpressCheckoutAPI request to initiate the transaction. See Setting Up the Express Checkout Transaction for integration details. - After receiving the
SetExpressCheckoutAPI response, redirect the customer to PayPal.
-
Show PayPal as a payment option near the other payment options on your Payment Methods page. Adding a PayPal radio button to your existing payment choices helps buyers read and understand the payment options in a clearer way.

- Provide a What is PayPal? link when using any PayPal banner, button or placement. Explaining what PayPal is help new buyers understand the benefits of choosing PayPal.
-
Pass your store logo and business name to the PayPal login and review pages. Passing your store logo and business name to be displayed on PayPal checkout pages creates a more seamless transition for your buyers and reassures them that they are still in your checkout flow. To set up this feature, log into your PayPal account, choose Profile > My Selling Tools > Custom payment pages and select to add a new page style. Note: Ensure that your logo is stored on a secure server so that your buyer's web browser does not display a message that the payment page contains nonsecure items.
-
Pass line item details to PayPal, including the breakdown of items and total purchase costs. Passing line item details also helps create a seamless transition from your site to the PayPal checkout flows and makes buyers feel more confident in their transactions because they can see their purchase details from start to end.
-
Customize the PayPal Payment Pages to match the style of your website. You can tailor PayPal's payment pages to match the style of your website and give buyers a seamless payment experience. Choose custom page colors and add images to make PayPal's payment flow yours. To customize the PayPal payment pages, log into your PayPal account, choose Profile > My Selling Tools; then from the Selling Online section, select Custom payment pages. For detailed instructions, refer to the customizing the PayPal payment page guide.
-
Pass any customer information you collect to PayPal to pre-fill billing information. If your website collects customer information about your buyer, you can pass that information to PayPal to pre-populate the corresponding customer information fields. This saves your buyers time and eliminates the need to re-enter their information.
-
Set the credit card statement name. Ensure your business name or website name is correctly set to show up on your buyers' credit card statements to avoid any confusion and potential chargebacks. To set the credit card statement name, log into your PayPal account, choose Profile, then My Selling Tools then Credit Card Statement Name under the Selling Online section. To set the credit card statement name, log into your PayPal account, choose Profile, > My Selling Tools, then from the Selling Online section, select Credit Card Statement Name.
You can customize the PayPal payment pages to provide a seamless experience for your buyers. Be sure to do the following:
![]() |
|
Integration Use Cases
Implementing Express Checkout requires you to set up a PayPal button and call the appropriate API's for the type of payments you want to offer. You must also enable the buyer to select PayPal as the payment method after the buyer starts to check out on your site. That means you must offer PayPal on your website in at least the following two places in the checkout flow:
- As a checkout option on your Shopping Cart page
- As a payment option on your Payment Methods page
Obtaining an Express Checkout Button and PayPal Mark
PayPal provides buttons and images for you to place on your website. To implement Express Checkout, you must:
- Place the following button on your shopping cart page. To create a checkout button, log in to your PayPal account and navigate to the Merchant Services tab. After you create a button, copy the button HTML code to your website.

- Offer PayPal as a payment choice on your payment options page using radio buttons. You can find html code to copy and paste on your site here.

- Include the words "What is PayPal?" next to the Express Checkout Shortcut Button, next to the PayPal Mark on your payment options page, and next to any PayPal banners or messaging. You can find the html code to copy and paste on your site here.
Use Case 1: A Sale Transaction
The following integration use cases highlight the basics of setting up a simple Express Checkout flow. For more advanced functionality, including how to set up recurring payments (subscriptions), reference transactions and implementing Express Checkout for Mobile and Digital Goods, please see the Express Checkout Integration Guide.
To create the simplest Express Checkout integration, you specify Sale as the payment action enabling you to receive the money right away. You can also set up a payment to be collected later, or refund a payment.
The simplest Express Checkout integration requires the following PayPal API operations:
SetExpressCheckoutGetExpressCheckout Details (optional)DoExpressCheckoutPayment
Setting Up the Express Checkout Transaction
To set up an Express Checkout transaction, you must invoke the SetExpressCheckout API operation to provide sufficient information to initiate the payment flow. Then redirect to PayPal if the operation is successful.
Note: This example assumes that you have set up the mechanism you will use to communicate with the PayPal server and have a PayPal business account with API credentials. It also assumes that the payment action is a final sale.
When you set up an Express Checkout transaction, you specify values in the SetExpressCheckout request and then call the API. The values you specify control the PayPal page flow and the options available to buyers. You should start by setting up a standard Express Checkout transaction, which can be modified to include additional options.
To set up the simplest standard Express Checkout transaction:
- Specify the amount of the transaction; include the currency if it is not in US dollars.
- Specify the total amount of the transaction if it is known; otherwise, specify the subtotal.
- For most currencies, the amount format must have a decimal point with exactly two digits to the right and an optional thousands separator to the left, which must be a comma. See the PayPal currency codes page for information about currencies that do not support decimals.
For example, EUR 2.000,00 must be specified as 2000.00 or 2,000.00. The specified amount cannot exceed USD $10,000.00, regardless of the currency used.
PAYMENTREQUEST_0_AMT=amount
PAYMENTREQUEST_0_CURRENCYCODE=currencyID
Specify the return URL - The return URL is your website page to which PayPal redirects the buyer's browser after the buyer logs into PayPal and approves the payment. Typically, this is a secure page (https://...) on your website.
Note: You can use the return URL to piggyback parameters between pages on your site. For example, you can set your Return URL to specify additional parameters using the https://www.yourcompany.com/page.html?param=value... syntax.
- The parameters become available as request parameters on the page specified by the Return URL.
RETURNURL=return_url
Specify the cancel URL - The cancel URL is the page to which PayPal redirects the buyer's browser if the consumer does not approve the payment. Typically, this is the secure page (https://...) on your website from which you redirected the consumer to PayPal.
- The parameters become available as request parameters on the page specified by the Return URL.
- You can pass
SetExpressCheckoutrequest values as parameters in your website's URL to have the values available, if necessary, after PayPal redirects to your website's URL.CANCELURL=cancel_url
Specify the payment action. - Although the default payment action is a Sale, it is a best practice to explicitly specify the payment action as one of the following values:
PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYMENTREQUEST_0_PAYMENTACTION=Authorization
PAYMENTREQUEST_0_PAYMENTACTION=Order - Execute the
SetExpressCheckoutAPI operation to set up the Express Checkout transaction.
- Test that the response to the
SetExpressCheckoutAPI operation was successful (Ack=Success). - If calling the
SetExpressCheckoutAPI was successful, redirect the consumer's browser to PayPal and execute the _express-checkout command using the token returned in theSetExpressCheckoutresponse.
- Test that the response to the
Obtaining Express Checkout Transaction Details
To obtain details about an Express Checkout transaction, you can invoke the GetExpressCheckoutDetails API operation.
Note: This example assumes that PayPal redirects to the your buyer's browser with a valid token after the consumer reviews the transaction on PayPal.
- Although you are not required to invoke the
GetExpressCheckoutDetailsAPI operation, most Express Checkout implementations take this action to obtain information about the buyer. - You invoke the
GetExpressCheckoutDetailsAPI operation from the page specified by return URL, which you set in your call to theSetExpressCheckoutAPI. - Typically, you invoke this operation as soon as the redirect occurs and use the information in the response to populate your review page.
- To obtain a buyer's shipping address and Payer ID, specify the token returned by PayPal when it redirects the consumer's browser to your site.
- PayPal returns the token to use in the token HTTP request parameter when redirecting to the URL you specified in your call to the
SetExpressCheckoutAPI.TOKEN=tokenValue - Execute the
GetExpressCheckoutDetailsAPI operation to obtain information about your buyer. - Access the fields in the
GetExpressCheckoutDetailsAPI response.Note: Only populated fields are returned in the response.
Completing the Express Checkout Transaction
To complete an Express Checkout transaction, you must invoke the DoExpressCheckoutPayment API operation.
Note: This example assumes that PayPal redirects the buyer's browser to your website with a valid token after you call the SetExpressCheckout API. Optionally, you may call the GetExpressCheckoutDetails API before calling the DoExpressCheckoutPayment API.
- In the simplest case, set the total amount of the order when you call the
SetExpressCheckoutAPI.- However, you can change the amount before calling the
DoExpressCheckoutPaymentAPI if you did not know the total amount when you called theSetExpressCheckoutAPI.
Note: This example assumes the simplest case, in which the total amount was specified in the return URL when calling the
SetExpressCheckoutAPI. Although you can specify additional options, this example does not use any additional options. - However, you can change the amount before calling the
- Specify the token returned by PayPal when it redirects the consumer's browser to your site.
- PayPal returns the token to use in the token HTTP request parameter when redirecting to the URL you specified in your call to the
SetExpressCheckoutAPI.TOKEN=tokenValue - Specify the Payer ID returned by PayPal when it redirects the buyer's browser to your website.
- PayPal returns the Payer ID to use in the token HTTP request parameter when redirecting to the URL you specified in your call to the
SetExpressCheckoutAPI. Optionally, you can obtain the Payer ID by calling theGetExpressCheckoutDetailsAPI.PAYERID=id - Specify the amount of the order including shipping, handling, and tax; include the currency if it is not in US dollars.
- Regardless of the specified currency, the format for most currencies must include a decimal point with exactly two digits to the right and an optional thousands separator to the left, which must be a comma.
- For example, EUR 2.000,00 must be specified as 2000.00 or 2,000.00.
- The specified amount cannot exceed USD $10,000.00, regardless of the currency used.
Note: Some currencies such as Yen do not support decimal points. See the PayPal currency codes page for currencies that do not support decimals.
PAYMENTREQUEST_0_AMT=amount
PAYMENTREQUEST_0_CURRENCYCODE=currencyID
Specify the payment action.
- Although the default payment action is a
Sale, it is a best practice to explicitly specify the payment action as one of the following values:PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYMENTREQUEST_0_PAYMENTACTION=Authorization
PAYMENTREQUEST_0_PAYMENTACTION=Order - Execute the
DoExpressCheckoutPaymentAPI to complete the Express Checkout transaction. - Examine the values returned by the API if the transaction completed successfully (
Ack=Success).
Use Case 2: Authorization and Capture transactions
An Authorization is used to put a hold on the funds. When you submit an Authorization you are asking PayPal to see if the funds are available, and if they are to place a hold on them for 3 days.
You can capture an Authorization for up to 29 days; however, the funds are only on hold for 3 days. These 3 days are known as the honor period.
Note: The honor period is a PayPal function. This is 3 days by default, and the maximum honor period is 10 days. This time period is dependent on the card issuing bank or the bank itself in ACH transactions such as a bank initiated transfer.
Authorization Example:
You know that you have the product in stock, but you only ship on Wednesdays and Fridays; and, today is Monday.
Monday:
The buyer goes to your website and adds the item to his/her cart and checks out via PayPal Express Checkout.
- You set the
PAYMENTACTIONtoAuthorizationin both theSetExpressCheckoutandDoExpressCheckoutPaymentAPI calls. - You get back an Authorization ID. The transaction is successful thus far.
Wednesday:
You go to ship the product.
- But before it ships, you capture the payment by making a
DoCaptureAPI call. - You send the amount you want to capture and the Authorization ID to PayPal and the actual money is moved from the consumer's funding source to the PayPal account.
You see a Success returned from PayPal and you ship the item.
Note: You may capture less than the Original Authorization, you may capture the full Authorization amount, or, you may capture more than the original Authorization (Up to 115% of the original Authorization, or $75 USD more, whichever is less).
Use Case 3: Refunds / Voids
Use the RefundTransaction API to issue one or more refunds associated with a transaction, such as a transaction created by a capture of a payment. The transaction is identified by a transaction ID that PayPal assigns when the payment is captured.
- You can use the
RefundTransactionPayPal API operation to issue refunds.Note: You cannot make a refund if the transaction occurred after the refund period has passed; typically, the refund period is 60 days. If you need to issue a refund after 60 days, a credit must be issued to the buyers' PayPal account instead.
- You can refund amounts up to the total amount of the original transaction.
- If a full refund is specified, the entire amount is refunded.
- If a partial refund is specified, the amount to refund, the currency, and a description of the refund, which is called a memo, must be specified.
- When you call the
RefundTransactionAPI, PayPal responds with another transaction ID that is associated with the refund (not the original transaction) and additional information about the refund.
This information identifies:- The gross amount of the refund, which is returned to the consumer.
- The amount of the refund associated with the original transaction fee, which is returned to you.
- The net amount of the refund, which is deducted from your balance.
- To issue a refund:
- In the
RefundTransactionrequest, specify the transaction ID of the original transaction which you want to refund.TRANSACTIONID = transaction_id - Specify the kind of refund, which is either
FullorPartial.REFUNDTYPE=Full
Or
REFUNDTYPE=Partial - For a partial refund, specify the refund amount, including the currency
AMT=amount
CURRENCYCODE=currencyID - For a partial refund, specify the memo description.
NOTE=description - Execute the
RefundTransactionoperation. - Check the acknowledgement status in the
RefundTransactionresponse to ensure that the operation was successful (Ack=Success).
- In the
Managing Response Codes
Possible error codes returned by each of the PayPal APIs can be found in an online list of API Error Codes.
- The error codes are broken out by API.
- The documentation includes both the Short and Long Message for each error and where appropriate possible corrective action to be taken.
Testing Your Integration
To test your integration, PayPal provides a Sandbox for you to use to ensure that your integration is working properly before releasing it to your buyers. The Sandbox environment is a duplicate of the live PayPal environment, except no money changes hand. You will need to sign up for a Sandbox account in order to use this environment. For more information and to sign up for a Sandbox account, please see the PayPal Sandbox Guide.
Note: The PayPal developer site automatically creates Sandbox credentials for you when you log in with your PayPal account for the first time to https://developer.paypal.com.
Going Live With Your Express Checkout Integration
After you have tested your application with the PayPal Sandbox, and you are ready to move it to production, use the following checklist to ensure you are not forgetting any steps for going live. For more information see the Going Live documentation.
- Create and configure your live PayPal account.
- Verify that your live account's profile settings match those in your sandbox account's profile or that you understand and approve the differences.
- Set up credentials for your live PayPal account. API credentials are associated with an account; thus, your credentials in production are different than those for the Sandbox. You must obtain either a different signature or download a different certificate for your live account.
- If your application uses a PayPal SDK, create an API Profile object that contains the details of your live account. You must specify the "environment" field as live and, if you use a certificate, include the API username, API password and path to your production API certificate with your live account.
- Add PayPal's IP addresses to any list of trusted IP addresses needed by your firewall or other network devices. You can find a current list of PayPal IP addresses here.
Sample Code
Which interface am I using?
PayPal provides an API to allow you to integrate with PayPal.
There are two interfaces to the PayPal API. Your technical team should use the one that makes the most sense for your development style and environment:
Name-Value Pair (NVP) interface
Requests and responses are sent using simple HTTP. This interface is better for those who prefer more lightweight, script-based development.
SOAP Interface
Requests and responses are sent using Simple Object Access Protocol (SOAP). This interface is better for those who prefer object-oriented development.
Express Checkout Sample Code
Use the following table to view SOAP or NVP sample code for each of the three API calls needed for Express Checkout:
| API Call | Sample Code |
|---|---|
SetExpressCheckout |
PHP Java .NET |
GetExpressCheckoutDetails |
PHP Java .NET |
DoExpressCheckoutPayment |
PHP Java .NET |
For SDK information, see the Merchant API SDK.
Documentation
Online references (in English)
Express Checkout Integration Guide
NVP API Developer Guide
API Endpoints
Digital Goods with Express Checkout Guide
Name-Value Pair (NVP) Interface
SOAP Interface
Classic APIs Getting Started Guide
PayPal SDKs
PayPal IP Addresses
PayPal Sandbox Guide
