The Express Checkout API is the Website Payments Pro alternative to standard PayPal shopping cart processing.
IMPORTANT: For a full understanding of the complete details about how to use Express Checkout, consult the PayPal Express Checkout Integration Guide.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:
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.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 eBayItemFor 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 AuctionTransactionIDTo 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 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.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
IMPORTANT: Any fields in the WSDL or XSD files that are not described here are ignored. For example, do not set CountryName.
IMPORTANT: To use SetExpressCheckout for recurring payments, you must set the version parameter to 50.0 in your API calls.
Table 5.1 A timestamped token, the value of which was returned by SetExpressCheckout response. 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. Your own unique invoice or tracking number. PayPal returns this value to you on response. URL to which the customer’s browser is returned after choosing to pay with PayPal.
Note: PayPal recommends that the value be the final review page on which the customer confirms the order and payment or billing agreement. URL to which the customer is returned if he does not approve the use of PayPal to pay you.
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: Setting this field overrides the setting you have specified in your Merchant Account Profile. 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.Displaying the PayPal street address on file does not allow the customer to edit that address.
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.Character length and limitations: Six character HTML hexadecimal color code in ASCII Sets the background color for the header of the payment page. By default, the color is white.Character length and limitation: Six character HTML hexadecimal color code in ASCII Sets the background color for the payment page. By default, the color is white.Character length and limitation: Six character HTML hexadecimal color code in ASCII
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.Default value: Sale 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 successful giropay payment.Use this field only if you are using giropay or bank transfer payment methods in Germany. The URL on the merchant site to redirect to after a giropay or bank transfer payment is canceled or fails.Use this field only if you are using giropay or bank transfer payment methods in Germany. Use this field only if you are using giropay or bank transfer payment methods in Germany. Billing agreement details for recurring payments. You can include up to 10 billing agreements per SetExpressCheckout request. See description
Note:
IMPORTANT: Any fields in the WSDL or XSD files that are not described here are ignored. For example, do not set CountryName.
Response to SetExpressCheckoutRequest.
Table 5.3 A timestamped token by which you identify to PayPal that you are processing this payment with Express Checkout.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 returns information about the customer, including name and address on file with PayPal.The following diagram represents the composition of the GetExpressCheckoutDetailsRequestType and GetExpressCheckoutDetailsResponseType elements.
Figure 5.2
Table 5.4 A timestamped token, the value of which was returned by SetExpressCheckout response. Response to GetExpressCheckoutDetailsRequest.
Table 5.5 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. Your own invoice or tracking number, as set by you in the element of the same name in SetExpressCheckout request .
Note: PayPal returns a contact telephone number only if your Merchant account profile settings require that the buyer enter one.Character length and limitations: Field mask is XXX-XXX-XXXX (for US numbers) or +XXX XXXXXXXX (for international numbers) Flag to indicate whether you need to redirect the customer to back to PayPal after completing the transaction. 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/>.
Table 5.6
l
Table 5.7
Table 5.8
l With DoExpressCheckoutPayment, you either obtain payment through Express Checkout for a final sale or request authorization for later capture of payment.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
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.
Table 5.9 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 Unique PayPal customer account identification number as returned by GetExpressCheckoutDetails response. Flag to indicate whether you want the results returned by Fraud Management Filters. By default, you do not receive this information.
Table 5.10
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.Currency code must be set the same as for OrderTotal.
IMPORTANT: If you do not specify this value in the request, the notification URL from your Merchant Profile is used, if one exists.Character length and limitations: 2,048 single-byte alphanumeric characters
Note:
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.
Table 5.11
Table 5.12
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.
Response to DoExpressCheckoutPaymentRequest.
Table 5.14 The timestamped token value that was returned by SetExpressCheckout response and passed on GetExpressCheckoutDetails request. Flag to indicate whether you need to redirect the customer to back to PayPal after completing the transaction.
Table 5.15
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
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.Character length and limitations: a decimal that does not exceed 17 characters, including decimal point 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.
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:
Table 5.17