Table of Contents Previous Next Index

Express Checkout API

Express Checkout API
The Express Checkout API is the Website Payments Pro alternative to standard PayPal shopping cart processing.
IMPORTANT:
The Express Checkout API consists of three distinct SOAP requests that you make at the three integration points during a customer checkout. The customer is also redirected to PayPal. Here is the sequence of steps:
1.
2.
3.
4.
IMPORTANT:
All currency amount fields in the three Express Checkout APIs require that the currencyID attribute be set to one of the supported currency codes. For any one particular buyer’s checkout session, do not mix currencies either in any single SOAP request or across SOAP requests. For example, do not set currencyID to USD in one request and then to GBP in a later request for the same buyer.
Express Checkout for eBay Auctions
You can use also use Express Checkout to check out for eBay auctions. You can mix eBay and non-eBay transactions in the same transaction.
If the buyer’s checkout includes eBay auctions, there are additional fields that you must set to control the behavior of Express Checkout.
In the SetExpressCheckout request:
l
PaymentAction must be Sale
l
ChannelType must be eBayItem
For eBay auctions, you cannot set PaymentAction to Authorization or Order. You must set PaymentAction to Sale.
In the DoExpressCheckoutPayment request, you must set PaymentAction to Sale. You must also provide line item details for each eBay auction so that the payment is properly reflected in My eBay and qualifies for PayPal Buyer Protection.
For each ebayItemPaymentDetailsItem line item, you must provide the following:
ItemNumber and AuctionTransactionID
or
OrderID
To properly reflect discounts, you can also supply negative line items. Note that the value that you supply for Amount must equal the total of the line item amounts that you supply.
SetExpressCheckout
SetExpressCheckout indicates to PayPal that you are using Express Checkout to obtain payment from your customer.
IMPORTANT:
To use SetExpressCheckout for recurring payments, you must set the version parameter to 50.0 in your API calls.
Diagram of Set ExpressCheckout Types
The following diagram represents the composition of the SetExpressCheckoutRequestType and SetExpressCheckoutResponseType elements. Elements required in the request are indicated with an asterisk.
Figure 5.1
SetExpressCheckoutRequest
Request to use PayPal Express Checkout to obtain payment.
IMPORTANT:
IMPORTANT:
To use SetExpressCheckout for recurring payments, you must set the version parameter to 50.0 in your API calls.
 
The total cost of the transaction to the customer. If shipping cost and tax charges are known, include them in this value; if not, this value should be the current sub-total of the order.
If the transaction includes one or more one-time purchases, this field must be equal to the sum of the purchases. If the transaction does not include a one-time purchase, this field can be set to 0.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
The expected maximum total amount of the complete order, including shipping cost and tax charges.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
A free-form field for your own use, such as a tracking number or other value you want PayPal to return on GetExpressCheckoutDetails response and response.
Note:
PayPal recommends that the value be the final review page on which the customer confirms the order and payment or billing agreement.
Note:
PayPal recommends that the value be the original page on which the customer chose to pay with PayPal or establish a billing agreement.
If you include a shipping address and set the AddressOverride element on the request, PayPal returns this same address in GetExpressCheckoutDetailsResponse.
The value 1 indicates that you require that the customer’s shipping address on file with PayPal be a confirmed address.
Note:
The value 1 indicates that on the PayPal pages, no shipping address fields should be displayed whatsoever.
The value 1 indicates that the PayPal pages should display the shipping address set by you in this SetExpressCheckout request, not the shipping address on file with PayPal for this customer.
l
l
l
l
l
l
l
l
l
l
l
l
l
l
Sets the Custom Payment Page Style for payment pages associated with this button/link. This value corresponds to the HTML variable page_style for customizing payment pages. The value is the same as the Page Style Name you chose when adding or editing the page style from the Profile subtab of the My Account tab of your PayPal account.
URL for the image you want to appear at the top left of the payment page. The image has a maximum size of 750 pixels wide by 90 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server. If you do not specify an image, the business name is displayed.
Sets the border color around the header of the payment page. The border is a 2-pixel perimeter around the header space, which is 750 pixels wide by 90 pixels high. By default, the color is black.
l
Sale indicates that this is a final sale for which you are requesting payment.
l
Authorization indicates that this payment is a basic authorization subject to settlement with PayPal Authorization & Capture.
l
Order indicates that this payment is an order authorization subject to settlement with PayPal Authorization & Capture.
Note:
You cannot set this value to Sale in SetExpressCheckout request and then change this value to Authorization or Order on the final API DoExpressCheckoutPayment request. If the value is set to Authorization or Order in SetExpressCheckout, the value may be set to Sale or the same value (either Authorization or Order) in DoExpressCheckoutPayment.
Email address of the buyer as entered during checkout. PayPal uses this value to pre-fill the PayPal membership sign-up portion of the PayPal login page.
l
Sole: Express Checkout for auctions
l
Mark: normal Express Checkout
l
Billing: non-PayPal account
l
Login: PayPal account login
l
Merchant: non-auction seller
l
eBayItem: eBay auction
The URL on the merchant site to redirect to after a giropay or bank transfer payment is canceled or fails.
Billing agreement details for recurring payments. You can include up to 10 billing agreements per SetExpressCheckout request.
See description
Note:
The AddressType elements are required only if you include the Address element in the SOAP request.
IMPORTANT:
StateOr
Province
SetExpressCheckoutResponse
Response to SetExpressCheckoutRequest.
Fields
 
If you set the token in the SetExpressCheckout request, the value of the token in the response is identical to the value in the request.
 
GetExpressCheckoutDetails
GetExpressCheckoutDetails returns information about the customer, including name and address on file with PayPal.
Diagram of GetExpressCheckoutDetails Types
The following diagram represents the composition of the GetExpressCheckoutDetailsRequestType and GetExpressCheckoutDetailsResponseType elements.
Elements required in the request are indicated with an asterisk.
Figure 5.2
 
GetExpressCheckoutDetailsRequest
Obtain details about a payment to be processed by PayPal Express Checkout.
Fields
 
GetExpressCheckoutDetailsResponse
Response to GetExpressCheckoutDetailsRequest.
Fields
 
The timestamped token value that was returned by SetExpressCheckout response and passed on GetExpressCheckoutDetails request.
A free-form field for your own use, as set by you in the Custom element of SetExpressCheckout request.
Note:
PayPal returns a contact telephone number only if your Merchant account profile settings require that the buyer enter one.
BillingAgreementAcceptedStatus
Note:
Empty elements are returned if there is no representative data for the customer. For example, if the customer does not represent a business (and therefore has no business name on file with PayPal), the returned element has no value, like this: <PayerBusiness/>.
ebl:PayPalUser
StatusCodeType
l
DoExpressCheckoutPayment
With DoExpressCheckoutPayment, you either obtain payment through Express Checkout for a final sale or request authorization for later capture of payment.
Diagram of DoExpressCheckoutPayment Types
The following diagram represents the composition of the DoExpressCheckoutPaymentRequestType and DoExpressCheckoutPaymentResponseType elements. Elements required in the request are indicated with an asterisk.
Figure 5.3
 
DoExpressCheckoutPaymentRequest
Request to obtain payment with PayPal Express Checkout.
IMPORTANT:
PayPal requires that a merchant using Express Checkout display to the customer the same exact amount that the merchant sends to PayPal in the OrderTotal element with the DoExpressCheckoutPaymentRequest API.
Fields
 
The timestamped token value that was returned by SetExpressCheckout response and passed on GetExpressCheckoutDetails request.
l
Order indicates that this payment is is an order authorization subject to settlement with PayPal .
l
Flag to indicate whether you want the results returned by Fraud Management Filters. By default, you do not receive this information.
 
Note:
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
Character length and limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Equivalent to nine characters maximum for USD.
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
Note:
Character length and limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Equivalent to nine characters maximum for USD.
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
Note:
Character length and limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Equivalent to nine characters maximum for USD.
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
IMPORTANT:
If you do not specify this value in the request, the notification URL from your Merchant Profile is used, if one exists.
Note:
The AddressType elements are required only if you include the Address element in the SOAP request.
IMPORTANT:
In the following table, any fields in the WSDL or XSD files that are not described here are ignored. For example, do not set CountryName.
Note:
Character length and limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Equivalent to nine characters maximum for USD.
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
Note:
Character length and limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator must be a period (.), and the optional thousands separator must be a comma (,). Equivalent to nine characters maximum for USD.
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
EbayItemPaymentDetailsItem
If you pass the EbayItemPaymentDetailsItem file, you must set ChannelType to eBayItem and PaymentAction to Sale.
DoExpressCheckoutPaymentResponse
Response to DoExpressCheckoutPaymentRequest.
Fields
 
The timestamped token value that was returned by SetExpressCheckout response and passed on GetExpressCheckoutDetails request.
Note:
If the PaymentAction of the request was Authorization or Order, this value is your AuthorizationID for use with the Authorization & Capture APIs.
l
l
l
Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.), and the optional thousands separator is a comma (,). Equivalent to nine characters maximum for USD.
Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.), and the optional thousands separator is a comma (,). Equivalent to nine characters maximum for USD.
Character length and limitations: Does not exceed $10,000 USD in any currency. No currency symbol. Regardless of currency, decimal separator is a period (.), and the optional thousands separator is a comma (,). Equivalent to nine characters maximum for USD.
Exchange rate if a currency conversion occurred. Relevant only if your are billing in their non-primary currency. If the customer chooses to pay with a currency other than the non-primary currency, the conversion occurs in the customer’s account.
Completed: The payment has been completed, and the funds have been added successfully to your account balance.
Pending: The payment is pending. See the PendingReason element for more information.
l
none: No pending reason
l
address: The payment is pending because your customer did not include a confirmed shipping address and your Payment Receiving Preferences is set such that you want to manually accept or deny each of these payments. To change your preference, go to the Preferences section of your Profile.
l
echeck: The payment is pending because it was made by an eCheck that has not yet cleared.
l
intl: The payment is pending because you hold a non-U.S. account and do not have a withdrawal mechanism. You must manually accept or deny this payment from your Account Overview.
l
multi-currency: You do not have a balance in the currency sent, and you do not have your Payment Receiving Preferences set to automatically convert and accept this payment. You must manually accept or deny this payment.
l
verify: The payment is pending because you are not yet verified. You must verify your account before you can accept this payment.
l
other: The payment is pending for a reason other than those listed above. For more information, contact PayPal customer service.
The reason for a reversal if TransactionType is reversal:
l
none: No reason code
l
chargeback: A reversal has occurred on this transaction due to a chargeback by your customer.
l
guarantee: A reversal has occurred on this transaction due to your customer triggering a money-back guarantee.
l
buyer-complaint: A reversal has occurred on this transaction due to a complaint about the transaction from your customer.
l
refund: A reversal has occurred on this transaction because you have given the customer a refund.
l
other: A reversal has occurred on this transaction due to a reason not listed above.
If you specified ReturnFMFDetails in your request, additional information is provided in the FMFDetails element:
Table 5.16
The FMFDetailsType element’s fields contain lists of filters, each with the following information: