Home
PayPal Express Checkout - 2009 Integration Guide
Contents
1. It is recommended that the maximum total amount be slightly greater than the sum of the line item order details tax and the shipping option of greatest value e Optionally provide values for the following parameters Set INSURANCEOPTIONOFFERED to true to inform PayPal that you are offering insurance options Otherwise set INSURANCEOPTIONSOFFERED to false TGHTUNIT1 and L_ITEMWEIGHTVALUE1 shown in the example below Set CALLBACKTIMEOUT to the amount of time in seconds to process the callback By default CALLBACKTIMEOUT is 3 You can specify a value in the range of 1 to 6 inclusive T Set line item description details such as L_ITEMW T This is an example SetExpressCheckout request The above parameters appear in boldface text Request Parameters Express Checkout Integration Guide October 2009 77 78 Implementing the Instant Update API Using the Callback requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL http amp CANCELURL http amp PAYMENTACTION Sale amp NAME J Smith amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp L_NAMEO 10 Decaf Kona Blend Coffee amp L_NUMBERO 623083 amp L_DESCO Size 8 8 oz
2. Response Parameters successResponseFields amp TOKEN EC 2HX34015EC629990M PayPal Page Style You can change the overall appearance of the PayPal review page by defining a custom page style or by customizing individual page style characteristics You define a custom page style in the PayPal Profile and then pass the resulting page style name in the call to SetExpressCheckout Typically you customize individual page style characteristics in the PayPal Profile as well However you can also call SetExpressCheckout and pass in individual page characteristics dynamically October 2009 Express Checkout Integration Guide Customizing Express Checkout PayPal Page Style Custom Page Style When your buyer logs into PayPal to check out you can make the PayPal pages the buyer sees appear to have a similar look and feel to those on your website You can customize any of these page characteristics and save the results as a Page Style Name Up to three unique Page Style Names can be defined in your account You can specify the following items e Header image e Header border color e Header background color e Page background color For instructions on how to customize page styles and create Page Style Names see the Merchant Setup and Administration Guide To set a custom page style in a call to SetExpressCheckout
3. e L_NUMBERn e L DESCn If you pass in unit price information L_AMTn without passing in the unit quantity L_OTYn the unit price will not display To show both values you must pass in values for both parameters You can pass in a value of 1 even if the item purchase is uncountable October 2009 Express Checkout Integration Guide Customizing Express Checkout em PayPal Review Page Order Details eBay Issued Incentives If the buyer s checkout includes eBay auction items you must set additional fields in the call to SetExpressCheckout to enable buyers to choose from eBay issued incentives such as eBay gift certificates coupons vouchers and gift cards that may apply to their order To enable the display of eBay incentives on the PayPal Review page you also must provide line item detail information for each eBay item When the buyer clicks the Enter gift certificate reward or discount link a dialog displays in which the buyer can either enter a redemption code or select from a list of all discounts applicable to eBay items in the cart display as shown below If multiple items display the buyer can select from the discounts they want applied to their order Dialog for entering redemption code or choosing discounts Voyage Travel Review your payment PayPal Secure Payments the information below is correct click Pay now to complete your payment View PayPal policies and your payment source rights Ph
4. 10 Handling Recurring Payments Recurring Payments Terms e Bill the outstanding amount of the recurring payments profile Limitations The current release of the Recurring Payments API has the following limitations e A profile can have at most one optional trial period and a single regular payment period e The profile start date may not be earlier than the profile creation date Recurring payments with Express Checkout also has the following limitations e At most ten recurring payments profiles can be created during checkout e You can only increase the profile amount by 20 in each 180 day interval after the profile is created Recurring Payments Terms Some terms are commonly used by PayPal in the context of recurring payments 90 October 2009 Express Checkout Integration Guide Recurring payments terms Handling Recurring Payments Recurring Payments With Express Checkout Term Definition Recurring payments profile Billing cycle Regular payment period Trial period Payment amount Outstanding balance Profile ID Your record of a recurring transaction for a single customer The profile includes all information required to automatically bill the buyer a fixed amount of money at a fixed interval One payment is made per billing cycle Each billing cycle is made up of two components e The billing period specifies the unit to be used to calculate the billing cycle such as days or months e The
5. No payments for 3 months __ApolyNow Learn more Change Ship to Jane Smith 1 Main Street San Jose CA 95171 Uniled States Change Coritact Infornation jsmith example com Special Instructions to Merchant You can allow the buyer to send you special instructions about an order This feature is especially helpful to buyers who want to customize merchandise A buyer also might want to tell you to ship their order at a later date because they are out of the country NOTE Users of this feature should be sure to read the instructions the buyer sends This feature appears as the link just below the item description on the PayPal Review page 12 When the buyer clicks the Add special instructions to merchant link a text box opens as shown in Special Instructions text box After the buyer enters special instructions and clicks Express Checkout Integration Guide October 2009 47 48 Customizing Express Checkout PayPal Review Page Order Details Continue the instructions are returned in the responses to GetExpressCheckoutDetails and DoExpressCheckoutPayment Special Instructions text box Description 10 DecafKona Blend Coffee tem 623083 Sire Boz Coffee Filter bags tem 623033 Sire Two 24 plece boxes Add special instructions to merchant Payment Method Quantity Amort 2 990 2 79 40 item total 99 30 Tac 259 Shipping and handling 5 99 Shipping discount 3 00 insurance 1 00 Totat 1
6. October 2009 Express Checkout Integration Guide Introducing Express Checkout Express Checkout Building Blocks To implement Express Checkout you must place the following button on your Shopping Cart page The safer easier way to pay To implement PayPal as a payment option which is part of Express Checkout associate the PayPal mark image with the option Using a radio button as shown in the image below is the recommended way to do this Payment Options PayPal ves n Express Checkout API Operations The PayPal API provides three operations for Express Checkout one to set up the transaction one to obtain information about the buyer and one to handle the payment and complete the transaction API Operation Description SetExpressCheckout Sets up the Express Checkout transaction You can specify information to customize the look and feel of the PayPal site and the information it displays You must include the following information e URL to the page on your website that PayPal redirects to after the buyer successfully logs into PayPal and approves the payment e URL to the page on your website that PayPal redirects to if the buyer cancels e Total amount of the order or your best estimate of the total It should be as accurate as possible GetExpressCheckout Obtains information about the buyer from PayPal including shipping information DoExpressCheckout Payment Completes the Express Checkout
7. Overview of Immediate Payment Immediate Payment enables you to have the buyer pay for an eBay item at the time the buyer commits to it This feature adds a few new SetExpressCheckout request parameters to ensure the eBay item is available to ship to the buyer when DoExpressCheckoutPayment is called The successful transaction returns the eBay transaction ID as an additional parameter value in the DoExpressCheckoutPayment response NOTE Sale is the only payment action supported by Immediate Payment Immediate Payment supports instant funding sources only so you can receive payment at the time your buyer commits to the eBay item NOTE PayPal recommends that you do not mix eBay and non eBay items in an Immediate Payment Transaction How Immediate Payment Works in the Express Checkout Flow After the buyer selects the item on eBay the buyer is redirected to your website Express Checkout flow The figure below shows how Immediate Payment integrates into your checkout flow Express Checkout Integration Guide October 2009 81 Immediate Payment Overview of Immediate Payment Shopping Review Place Order Order Payment Confirmation Order 6 Merchant Redirects to PayPal be PayPal Server PNE ti DoEC ALLOWEDPAYMENTMETHOD ALLOWED EBAYITEM BUYERUSERNAME GetEC PAYMENTMETHOD AUCTIONTXNID L_EBAYITEMCARTIO oat 4 YITEM TOKEN optional meme hts s 7 Merchant System From left to right the following
8. Por qu utilizar PayPal Puede utilizar su tarjeta de cr dito sin revelar su n mero de IDENTIFIQUESE EN PAYPAL tarjeta al vendedor Puede realizar r pidamente el pago sin tener que introducir electr nico el n mero de la tarjeta ni la direcadn Contrase a R trese para obtener una cuenta PayPal ontinuar el r on e para obte una cuenta PayPal y continua identiffquese Cancelar y volver a WebsiteName com Ha olvidado su direcci n de correo alectr nico o ru contrasefia Handling Shipping Addresses You can specify several shipping address options that affect the PayPal Review page Express Checkout Integration Guide October 2009 59 o 6 Customizing Express Checkout Handling Shipping Addresses In your SetExpressCheckout request you can specify the following options e Require a confirmed address e Not display the shipping address on the review page e Display an alternative address on the review page Confirmed Address A confirmed address is a shipping address that PayPal has established as belonging to the PayPal account holder To be protected by PayPal s Seller Protection Policy you must require the shipping address be a confirmed address NOTE Because many buyers prefer to ship to a non confirmed address they may for example be shipping a gift to someone PayPal does not recommend requiring a confirmed address unless you are selling high risk merchandise If you prefer confirmed addresses b
9. Shopping Cart SetExpressCheckout PayPal API 2 Server Response Token 3 PayPal Login amp LL HTTP Redirect gt 4 HTTP Redirect m E 5 Request Token PayPal GetExpressCheckoutDetails API Server Response Customer Details 6 Request Final Transaction Details DoExpressCheckoutPayment cnn Response Transaction Results Payment lt _ Created 3 Request Final Transaction Details Recurring PayPal API Server CreateRecurringPaymentsProfile ee J Response Transaction Results Profile ID Success Failure The circled numbers in the diagram correspond to the following steps 92 October 2009 Express Checkout Integration Guide Handling Recurring Payments oa Recurring Payments With Express Checkout Recurring payments processing flow Step Merchant PayPal 1 Calls SetExpressCheckout with one or more billing agreement details in the request 2 Returns a token which identifies the transaction to the merchant 3 Redirects buyer s browser to https www paypal com cgi bin webscr cmd _express checkout amp token lt token returned by SetExpressCheckout gt Displays login page Allows user to select payment options and shipping address 4 Redirects buyer s browser to returnURL passed to SetExpressCheckout if buyer agrees to payment description 5 Calls GetExpressCheckoutDetails to get buyer information
10. 11 Total This is the total of the order including shipping handling tax and other price adjustment related items NOTE The Enter gift certificate reward or discount link enables the buyer to redeem certificates rewards or discounts PayPal issues The link does not enable the buyer to redeem incentives that you issue 12 Note You can allow the buyer to send you special instructions about the order in a text box that appears when the buyer clicks this link 46 October 2009 Express Checkout Integration Guide Customizing Express Checkout aa PayPal Review Page Order Details PayPal Review page with order details Your Website Review your information PayPal amp serie Paywents Ethe information below is correct click Cominue You will confum your payment on the next page View PayPal policies and your payment source righis Description Unt Price 2 Quantty Amort H i 10 Decaf Kona Blend Cofee eri 9 95 2 Lert OQRURS eeteeersesereeseneseeseseseseersesens SE E BOI Prsssiarssisissssssssssssasa asy i Coffee Filter Bags 39 70 2 79 40 a O tem 2 623034 Sre Two 24 piece boxes pm EJ Add special instructons to merchant Item total 99 30 emi Sales tax 2 58 ernst Shipping and handing 5 99 passt Shipping discount 3 00 esesesers Insurance 1 00 ons 4 heans Total 105 87 usb x f te et Payment Method CreditDebs Card Visa O0O HOO O 0084 PayPal Plus Credit Card
11. Obtaining Express Checkout Transaction Details 2 002004 37 Completing the Express Checkout Transaction 000002 eee eee 37 Chapter 5 Testing an Express Checkout Integration 39 Chapter 6 Customizing Express Checkout 45 PayPal Review Page Order Details o aoa a a a a 45 Special Instructions to Merchant oaoa 47 Integrating Order Details into the Express Checkout Flow 48 eBay Issued Incentives 0 00 2 51 Integrating eBay Incentives into the Express Checkout Flow 52 4 October 2009 Contents a PayPal Page Style 6 memnu ruaa O a 54 Custom Page Style 2 a 55 Individual Page Style Characteristics 2 a 55 Changing the Locale 2 2 a 58 Handling Shipping Addresses 2 a 59 Confirmed Address 1 a a a a a a a a a a 60 Suppressing the Buyer s Shipping Address ao aoa 2 000004 ae 61 Shipping Address Override o aooaa 63 Automatically Filling Out the PayPal Login Page aaau aaa 65 User Confirms Order on PayPal aoaaa eee ee 67 Chapter 7 Implementing the Instant Update API 69 About the Instant Update API 2 200002 a 69 Integration Steps 2 a 69 Post Integration Checkout Experience 0 0002 eee 70 How the Callback Works in the Express Checkout Flow 2 4 72 Following Instant Update API Best Practices 22 20 73 Sett
12. United States Change Forget emal address or password Emaa jsmahO1 exarnple com Whar s thes Password Contact information jsmnith0 1 example com 408 555 5948 Ch Change Cancel and return to YebsteName com User Confirms Order on PayPal If you do not require the buyer to explicitly review and confirm the order on your site you can configure Express Checkout such that the user commits the payment on PayPal This reduces a step in the checkout flow You may want to eliminate your Review Order page if there is no additional information you want to collect from the user before they complete the transaction It is recommended that you collect the information after the buyer completes the purchase You should evaluate each Express Checkout flow separately through the cart page and through the payment methods page In most checkout flow implementations the payment methods page is the last page the buyer sees before commiting to a transaction If this true in your implementation you can use this feature to streamline the buyer experience The feature informs the buyer that they are commiting to the transaction if they proceed To invoke this feature use the useract ion variable in the SetExpressCheckout call Setting useraction to commit sets the button text on the PayPal Payment Review page to Express Checkout Integration Guide October 2009 67 68 Customizing Express Checkout User Confirms Order on PayPal read Pa
13. o oo oaa 2 ee 20 Feedback to Buyer Meeting an Incentive oaoa oaoa 2500 20 Choose the Image oaoa aa ee 20 October 2009 a Contents Dynamic Image Command Reference 0000 0 ee eee ee 20 Dynamic Image Parameters 2 oaa aa a a 21 Locale CodeS s e s nos ee he be eee ee td aed Re Ae ae ee ee os 21 Static PayPal Buttons and Images Source Requirements 23 Chapter 3 PayPal Name Value Pair API Basics 25 PayPal API Client Server Architecture 2 25 PayPal Name Value Pair API Requests and Responses 25 Multiple API Operations aoa aa ee 26 Obtaining API Credentials 2 a a a 28 Creating an API Signature 2 a 28 Creating an API Certificate o oo aa ee 30 Creating an NVP Request 2 aa 30 Specifying the PayPal API Operation 0 0 00000 eee ee 30 Specifying an API Credential o oo aaa 31 WIRE ENGOding e s te aoe ee eg ee ee ee ee ee a AS 32 List Syntax for Name Value Pairs 2 aa 32 Executing NVP API Operations 2 2 ee 33 Specifying a PayPal Server oaoa aaa a 33 Logging API Operations oa oa a 33 Responding to an NVP Response 000002 eee ee eee 34 Common Response Fields 2 2 2 34 URL D6COCING o ages dd 2 becca ie ee ee OR eG eee kee hee eG 34 Chapter 4 Implementing the Simplest Express Checkout Integration 35 Setting Up the Express Checkout Transaction 0 0000 2 eee ee 35
14. optional Returns GetExpressCheckoutDetails response Displays merchant review page for buyer 6 Calls DoExpressCheckoutPayment if the order includes one time purchases as well as a recurring payment Otherwise skip this step Returns DoExpressCheckoutPayment response Calls CreateRecurringPayment sProfileone time for each recurring payment item included in the order Returns ProfileID in CreateRecurringPaymentsProfile response for each profile successfully created 7 Displays successful transaction page Initiating the Processing Flow With SetExpressCheckout As in the Express Checkout flow the SetExpressCheckout request notifies PayPal that you are e Initiating an order that can be either a one time purchase up to ten recurring payments or a mixture of a one time purchase and recurring payments Express Checkout Integration Guide October 2009 93 10 Handling Recurring Payments Recurring Payments With Express Checkout e Initiating the processing flow to create one or more billing agreements for recurring payments with no associated one time purchase or recurring payment NOTE You can also initiate the processing flow using SetCustomerBillingAgreement for orders that contain only a single recurring payment Typically you set the amount of the payment for an Express Checkout transaction when you call the SetExpressCheckout request and confirm the amount in the DoExpressCheckoutPayment request I
15. 1 Include the optional PAGESTYLE parameter in the call to SetExpressCheckout 2 Set PAGESTYLE to the Page Style Name you defined in your account The following example sets PAGESTYLE to the Page Style Name Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp CURRENCYCODE USD amp PAYMENTACTION Sales amp amp PAGESTYLE TestMerchant amp S PTOSTREET 1 Main St TOSTREET2 I P amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 4 008 967 4444 Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P Individual Page Style Characteristics Typically you create a custom page style for the PayPal pages using the Custom Payment Pages option from the PayPal Profile tab In cases where you do not want to use the Profile option you can specify any of the individual page style characteristics e Header image Express Checkout Integration Guide October 2009 55 Customizing Express Checkout PayPal Page Style e Header border color e Header background color e Page background color To define a header image such as your company logo 1 Create a header image up to 750 pixels wide by 90 pixels high and save it in a valid graphics format
16. Command Reference Change the Locale To specify the locale of the image append the Locale parameter set to the code for the appropriate country to the image URL If a country does not have a localized image or if you do not pass a locale value the default US image displays This example displays the image for the Spanish locale https fpdbs paypal com dynamicimageweb cmd _dynamic image pal SFJCXFDLNFR5U amp locale es_ES If you are participating in a campaign across multiple countries you can set the image locale for each country in which you participate PayPal returns the default image associated with the locale when the campaign is over Feedback to Buyer Meeting an Incentive Pass the order total amount in the ordertotal parameter so PayPal can determine if the buyer is eligible for an incentive Say for example that you are participating in a campaign in which the buyer is eligible for a 20 discount when their order meets a minimum of 50 00 You can pass that value to PayPal in the ordertotal parameter as shown here https fpdbs paypal com dynamicimageweb cmd _dynamic image amp pal SFJCXFDLNFR5U ordertotal 50 00 When a buyer s order meets or exceeds 50 00 PayPal displays the incentive image informing the buyer of their eligibility for the discount When a buyer s order is less than 50 00 PayPal displays the default image NOTE If ordertotal is not passed PayPal does not display the incentive imag
17. PayPal Inc reserves the right to make changes to any information herein without further notice Contents Preface 7 Intended Audience 2 2 ee ee 7 Where to Go for More Information a oao a a 7 Revision HISO s sos beh a ois be bo he ded ie Se EO A eee a bo eee amp 7 Chapter 1 Introducing Express Checkout 9 The Express Checkout Experience 2 2 a 9 Getting Started 2 ee 10 Configuring and Customizing the Express Checkout Experience 11 Additional PayPal API Operations 2 2 0 020 eee ee 11 Express Checkout Flow oaoa 12 Checkout Entry Point aoaaa 12 Payment Option Entry Point o 12 Complete Express Checkout Flow 0 00 2 ee ee 13 Express Checkout Building Blocks 0 00000 eee eee ee 14 Express Checkout Buttons oaoa oa a a 14 Express Checkout API Operations oaoa a a 0000 eee eee 15 Express Checkout Command aaaea a 00 eee ee es 15 Express Checkout Token Usage aoaaa a a 16 Chapter 2 Express Checkout Button and Logo Image Integration 17 About PayPal Button and Logo Images 0 00000 eee 17 Express Checkout Images 2 00 0 ee 17 Express Checkout Image Flavors 2 2 00 0c ee 17 Dynamiclmages oa a daad iara a daa aaa aas deae ee 18 Configuring the Dynamic Image a aoaaa 18 Set Up the Default Image ooa a a 0 000 ee 19 Set Up Image for Dynamic Use oaoa oa a 19 Change the Locale
18. PayPal account and continue checkout Cancel and return to WebsiteName com LOG IN TO PAYPAL Email Password Forgot email address or password Changing the Locale You can change the locale of PayPal pages to match the language on your website To change the language displayed on the PayPal Login page set the LOCALECODE parameter to one of the following allowable values in the SetExpressCheckout call e AU e DE e FR e GB e IT e ES e JP e US October 2009 Express Checkout Integration Guide Customizing Express Checkout aa Handling Shipping Addresses The following example sets LOCALCODE to ES Spain Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp CURRENCY CODE EUR PAYMENTACTION Sale amp LOCALECODE ES amp SHIPTOSTREET 1 Main St amp SHIPTOSTREET2 amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 408 967 4444 Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P The figure below shows the PayPal Login page when the LOCALECODE is set to ES PayPal login page in Spanish Espa ol v WebsiteName com PayPal es la forma r pida y segura de pagar PayPal Secure Payments PayPal procesa de forma segura los pagos para WebsiteName com Pague con PayPal con dos pulsaciones
19. Recurring Payments Profile NVP SOAP Description PROF ILESTARTDATE RecurringPaymentsProfileDet The date when billing for this profile ails BillingStartDate begins NOTE The profile may take up to 24 hours for activation BILLINGPERIOD ScheduleDetails The unit of measure for the billing cycle PaymentPeriod Must be one of BillingPeriod e Day e Week e SemiMonth e Month e Year BILLINGFREQUENCY ScheduleDetails Number of billing periods that make up PaymentPeriod one billing cycle BIL inge reduency NOTE The combination of billing frequency and billing period must be less than or equal to one year NOTE If the billing period is SemiMonth the billing frequency must be 1 AMT ScheduleDetails Amount to bill for each billing cycle PaymentPeriod Amount You can optionally include a value for TOTALBILLINGCYCLES SOAP field ScheduleDetails PaymentPeriod TotalBillingCycles which specifies the total number of billing cycles in the regular payment period If no value is specified or if the value is 0 the payments continue until the profile is canceled or suspended If the value is greater than 0 the regular payment period will continue for the specified number of billing cycles You can also specify an optional shipping amount or tax amount for the regular payment period Including an Optional Trial Period 96 You can optionally include a trial period in the profile by specifying the
20. SetExpressCheckout API TOKEN tokenValue 2 Execute the GetExpressCheckoutDetails API to obtain information about the buyer 3 Access the fields in the GetExpressCheckoutDetails API 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 This example assumes that PayPal redirects your 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 you set the total amount of the order when you call the SetExpressCheckout API However you can change the amount before calling the DoExpressCheckoutPayment API if you did not know the total amount when you called the SetExpressCheckout API Express Checkout Integration Guide October 2009 37 38 Implementing the Simplest Express Checkout Integration Completing the Express Checkout Transaction This example assumes the simplest case in which the total amount was specified in the return URL when calling the SetExpressCheckout API Although you can specify additional options this example does not use any additional options To execute an Express Checkout transaction 1 Specify the token returned by PayPal when it redirects the buyer s brows
21. You execute a PayPal API operation by submitting the request to a PayPal API server To execute a PayPal NVP API operation submit your complete request to one of the following end points Server end point Description https api Sandbox server for use with API signatures use for testing your 3t sandbox paypal com nvp API https api 3t paypal com nvp PayPal live production server for use with API signatures https api sandbox paypal com nvp Sandbox server for use with API certificates use for testing your API https api paypal com nvp PayPal live production server for use with API certificates NOTE You must use different API credentials for each kind of server Typically you obtain API credentials when you test in the Sandbox and then obtain another set of credentials for the production server You must change each API request to use the new credentials when you go live Logging API Operations You should log basic information about each PayPal API operation you execute All responses to PayPal API operations contain information that may be useful for debugging purposes You should log the Correlation ID which identifies the API operation to PayPal and response specific information such as the transaction ID which you can use to review a transaction on the PayPal website or through the API You can log other information that may be useful such as the timestamp You could implement a scheme that logs
22. address telephone number and email address in the call to SetExpressCheckout as shown in the example below Express Checkout Integration Guide October 2009 65 66 Customizing Express Checkout Automatically Filling Out the PayPal Login Page Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp PAYMENTACTION Sale amp SHIPTOSTREET 1 Main Street amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp EMAIL jsmith01 example com amp SHIPTOPHONENUM 408 559 5948 Response Parameters successResponseFields amp TOKEN EC 6UA07551EA393551U As a convenience PayPal fills out the billing address fields with the buyer s shipping address as shown in the example figure below The buyer can edit the information by clicking the Change links October 2009 Express Checkout Integration Guide Customizing Express Checkout aa User Confirms Order on PayPal Pre populated PayPal Login page WebsiteName com Create a PayPal Account or Log In PayPal Secure Payments Leam more about PayPal the safer easier way to pay Creme a PayPal accoum Ak eady have a PayPal accourm Country United States Please log in Creda Card Number Payment Type VISA gn peg f csc Expiration Date Billing Information Jane Smith 1 Main Street bog in San Jose CA95131
23. amp PWD SAPI_Password amp USER SAPI_UserName amp SIGNATURE SAPTI_Signature URL Encoding All requests to execute PayPal API operations sent via HTTP must be URL encoded The PayPal NVP API uses the HTTP protocol to send requests and receive responses from a PayPal API server You must encode all data sent using the HTTP protocol because data that is not encoded could be misinterpreted as part of the HTTP protocol instead of part of the request Most programming languages provide a way to encode strings in this way You should consistently URL encode the complete API request otherwise you may find that unanticipated data causes an error NOTE An HTTP form is automatically URL encoded by most browsers List Syntax for Name Value Pairs The PayPal API uses a special syntax for NVP fields defined as lists The NVP interface to the PayPal API requires a unique name for each field In the API lists are prefixed by L_ To identify an element within the list use the offset from the beginning of the list starting with 0 as the first element For example L_DESCO is the first line of a description L_DESC1 is the second line and so on October 2009 Express Checkout Integration Guide PayPal Name Value Pair API Basics So Executing NVP API Operations Executing NVP API Operations You execute an PayPal NVP API operation by submitting an HTTP POST request to a PayPal API server Specifying a PayPal Server
24. billing frequency specifies the number of billing periods that make up the billing cycle For example if the billing period is Month and the billing frequency is 2 the billing cycle will be two months If the billing period is Week and the billing frequency is 6 the payments will be scheduled every 6 weeks The main subscription period for this profile which defines a payment amount for each billing cycle The regular payment period begins after the trial period if a trial period is specified for the profile An optional subscription period before the regular payment period begins A trial period may not have the same billing cycles and payment amounts as the regular payment period The amount to be paid by the buyer for each billing cycle If a payment fails for any reason that amount is added to the profile s outstanding balance An alphanumeric string generated by PayPal that uniquely identifies a recurring profile Recurring Payments With Express Checkout During the Express Checkout flow you can create one or more recurring payments and mix recurring payments with other purchases The following diagram illustrates the typical processing flow to create recurring payments during checkout Express Checkout Integration Guide October 2009 91 10 Handling Recurring Payments Recurring Payments With Express Checkout Legend m Web Flow API Call Token A Profile ID Merchant website A Request
25. cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Spain https www paypal com es cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Switzerland https www paypal com ch cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside United Kingdom _https www paypal com uk cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside United States https www paypal com us cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside To get the HTML code for the PayPal Acceptance Mark image and for other general information about images change the command value in the URLs above to cmd xpt Market ing_CommandDriven general OnlineLogoCenter outside For example to get the PayPal Acceptance Mark image for Poland change the URL to https www paypal com pl cgi bin webscr cmd xpt Marketing CommandDriven general OnlineLogoCenter outside 24 October 2009 Express Checkout Integration Guide PayPal Name Value Pair API Basics The PayPal API uses a client server model in which your site is a client of the PayPal server e PayPal API Client Server Architecture e Obtaining API Credentials e Creating an NVP Request e Executing NVP API Operations e Responding to an NVP Response PayPal API Client Server Architecture The PayPal API uses a client server model in which your site is a client of the PayPal server You set
26. in the table below Express Checkout Integration Guide October 2009 23 ime Express Checkout Button and Logo Image Integration Static PayPal Buttons and Images Source Requirements Check out with PayPal button URLs Country Image URL Australia https www paypal com au cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Austria https www paypal com at cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Belgium https www paypal com be cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Canada https www paypal com ca cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside China https www paypal com cn cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside France https www paypal com fr cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Germany https www paypal com de cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Italy https www paypal com it cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Japan https www paypal com j1 cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Netherlands https www paypal com nl cgi bin webscr cmd xpt Merchant merchant ExpressCheckoutButtonCode outside Poland https www paypal com pl cgi bin webscr
27. language_0O en_US default language_1 fr_XC default language_2 es_XC default language_3 zh_XC DE language_0O de_DE DE language_1 en_US ES language_0O es_ES ES language_1 en_US FR language_O fr_FR FR language_1 en_US GB language_0O en_GB GF language_0O fr_FR GF language_1 en_US GI language_0O en_US GP language_0O fr_FR GP language_1 en_US October 2009 Express Checkout Integration Guide Express Checkout Button and Logo Image Integration an Static PayPal Buttons and Images Source Requirements Country code Language priority Locale IE language_0O en_US IT language_0O it IT IT language_1 en_US JP language_0O ja_JP JP language_1 en_US MQ language_0O fr_FR MQ language_1 en_US NL language_0O nl_NL NL language_1 en_US PL language_0O pl_PL PL language_1 en_US RE language_0O fr_FR RE language_1 en_US US language_0O en_US US language_1 fr_XC US language_2 es_XC US language_3 zh_XC Static PayPal Buttons and Images Source Requirements Using the static image code on the PayPal servers eliminates the need for you to maintain them yourself PayPal requires that you use Express Checkout images hosted on PayPal s secure servers rather than hosting copies of these images on your own servers Out of date PayPal buttons on you site could reduce customer confidence If the buttons are updated the new buttons will appear automatically in your application To get the HTML code for the Check out with PayPal button use the URLs
28. period of an authorization expires simply by creating another authorization You can void an order or an authorization created from the order If you void an order the uncaptured part of the amount specified in the DoExpressCheckoutPayment request becomes void and can no longer be captured If no part of the payment has been captured the entire payment becomes void and nothing can be captured If you void an authorization associated with the order the uncaptured part of the amount specified in the authorization becomes void and can no longer be captured If no part of the authorization has been captured the entire authorized payment becomes void API operations associated with order payment actions API Operation Description DoAuthorization Authorize a payment DoCapture Capture an authorized payment DoVoid Void an order or an authorization Express Checkout Integration Guide October 2009 87 it Handling Payment Settlements Order Payment Action 88 October 2009 Express Checkout Integration Guide Handling Recurring Payments Set up a recurring payment to handle subscription and other payments that occur on a fixed schedule e Recurring Payments Demo e How Recurring Payments Work e Recurring Payments Terms e Recurring Payments With Express Checkout e Options for Creating a Recurring Payments Profile e Recurring Payments Profile Status e Getting Recurring Payments Profile Information e Modifying a Recurrin
29. profiles created with Express Checkout the buyer receives an email about the change in status of their recurring payment Getting Recurring Payments Profile Information Use the GetRecurringPaymentsProfileDetails API to get information about a profile October 2009 Express Checkout Integration Guide Handling Recurring Payments oe Modifying a Recurring Payments Profile NOTE You can also get information about recurring payments profiles from the PayPal website Along with the information that you specified in the CreateRecurringPaymentsProfile request GetRecurringPayment sProfileDetails also returns the following summary information about the profile e Profile status e Next scheduled billing date e Number of billing cycles completed in the active subscription period e Number of billing cycles remaining in the active subscription period e Current outstanding balance e Total number of failed billing cycles e Date of the last successful payment received e Amount of the last successful payment received Modifying a Recurring Payments Profile Use the UpdateRecurringPaymentsProfile API to modify a recurring payments profile NOTE You can also modify recurring payments profiles from the PayPal website You can only modify the following specific information about an active or suspended profile e Subscriber name or address e Past due or outstanding amount e Whether to bill the outstanding amount with the next billing cycl
30. the entire request and response in a verbose mode however you should never log the password from a request Express Checkout Integration Guide October 2009 33 4 PayPal Name Value Pair API Basics Responding to an NVP Response Responding to an NVP Response The Name Value Pair response consists of the answer to the request as well as common fields that identify the API operation and how it was executed The following diagram shows fields in the response to a PayPal NVP API operation Your Site I NVP Response ACK Success l PayPal TIMESTAMP 2008 2d04 2 P ayP al CORRELATIONID 63cdac0b VERSION 52 2e000000 BUILD 1 2e0006 Response specific fields Common Response Fields The PayPal API always returns common fields in addition to fields that are specific to the requested PayPal API operation A PayPal API response includes the following fields Field Description ACK Acknowledgement status which is one of the following values e Success indicates a successful operation e SuccessWithWarning indicates a successful operation however there are messages returned in the response that you should examine e Failure indicates that the operation failed the response will also contain one or more error message explaining the failure e FailureWithWarning indicates that the operation failed and that there are messages returned in the response that you should examine
31. transaction including the actual total amount of the order Express Checkout Command PayPal provides a command that you use when redirecting to PayPal which enables your buyer to log into PayPal to approve an Express Checkout payment Express Checkout Integration Guide October 2009 15 a Introducing Express Checkout Express Checkout Building Blocks When you redirect your buyer s browser to PayPal you must specify __ExpressCheckout command for Express Checkout You also specify the token that identifies the transaction which was returned by the SetExpressCheckout API operation IMPORTANT To enable PayPal to redirect back to your website you must have already invoked the SetExpressCheckout API operation specifying URLs that PayPal uses to redirect back to your site PayPal redirects to the success URL when the buyer pays on PayPal otherwise PayPal redirects to the cancel URL If the buyer approves the payment PayPal redirects to the success URL with the following information e The token that was included in the redirect to PayPal e The buyer s unique identifier Payer ID If the buyer cancels PayPal redirects to the cancel URL with the token that was included in the redirect to PayPal Express Checkout Token Usage Express Checkout uses a token to control access to PayPal and execute Express Checkout API operations The SetExpressCheckout API operation returns a token which is used by other Express Check
32. website they are separate entities and not related to each other Creating an NVP Request The Name Value Pair request format specifies the API operation to perform credentials that authorize PayPal to access your account and fields that specify additional information to be used in the request Specifying the PayPal API Operation For the NVP version of the PayPal API you must specify the name of the PayPal API operation to execute and its version in each request The following diagram shows the API operation part of an NVP request 30 October 2009 Express Checkout Integration Guide PayPal Name Value Pair API Basics So Creating an NVP Request Your Site I NVP Request i METHOD SetExpressCheckout as E VERSION 52 0 PayPal API credentials i eis Cd A method specifies the PayPal operation you want to execute Each method is associated with a version number together the method and version defines the exact behavior of the API operation Typically the behavior of an API operation does not change between versions however you should carefully retest your code whenever you change a version To specify a method and version number 1 Choose the PayPal API operation you want to use METHOD operation 2 Choose the appropriate version In most cases you will want to use the latest version of the API operation VERS ION version_number Setting the API operation and version using PHP function PPHttpPost Smeth
33. you must pass the ALLOWEDPAYMENTMETHOD This is the payment method type For immediate payment the value is InstantPaymentOnly L_EBAYITEMCARTIDn EBay provides you with this value At this time PayPal checks the availability of the eBay item 8 If the item is available and payment is successful the DoExpressCheckoutPayment response returns the eBay transaction ID EBAYITEMAUCTIONTXNID Integrating Immediate Payment into the Express Checkout Flow To integrate Immediate Payment into your Express Checkout flow you add a few new fields to SetExpressCheckout and DoExpressCheckoutPayment The Call to SetExpressCheckout You must have Express Checkout integrated into your payment solution It is recommended that you sell one eBay item in a transaction or a quantity of the same item considered a single eBay listing To integrate Immediate Payment into the SetExpressCheckout call 1 Set ALLOWEDPAYMENTMETHODTYPE to InstantPaymentOnly This blocks all pending funding sources and transactions that end up in a pending state Pass BUYERUSERNAME and L_EBAYITEMCARTIDn Set CHANNELTYPE to eBayItem 2 3 4 Set L_EBAYITEMNUMBERn to the number of the eBay item 5 Specify the buyer s shipping address 6 Be prepared to handle Immediate Payment errors For errors you choose to handle you need
34. 05 87 USD Enter gift certficale reward or discount Credit Card Visa KOO OOK 000 1501 pearon Integrating Order Details into the Express Checkout Flow To integrate order details into the checkout flow pass the Express Checkout parameters described in SetExpressCheckout Order Details Parameters to SetExpressCheckout October 2009 Express Checkout Integration Guide Customizing Express Checkout PayPal Review Page Order Details SetExpressCheckout Order Details Parameters NVP Field SOAP Field Description and Comments 1 NAMEin 1 DESCn L_AMTn L_QTYn ITEMAMT TAXAMT NUMBE Rn SHIPPINGAMT HANDLINGAMT SHIPDISCAMT INSURANC AMT ALLOWNOT EAMT 5a Name Number Description Amount Quantity ItemTotal TaxTotal ShippingTotal HandlingTotal ShippingDiscoun t InsuranceAmount OrderTotal AllowNote Item name Item number Item description The DESC NVP and OrderDescription SOAP fields still exist for backwards compatibility However L_DESCn and Description enable you to provide a more precise description for each different item purchased such as hiking boots or cooking utensils rather than one general purpose description such as camping supplies Item unit price PayPal calculates the product of the item unit price and item unit quantity below in the Amount column of the PayPal Review page as shown i
35. C EC Flat Rate Token Options a 9 40 Line Item Shipping Details Token Options Merchant System API Call to Carriers From left to right the following events are represented Text in boldface describes events supporting the callback 1 The Express Checkout flow is initiated on your shopping cart page when the buyer clicks the Checkout with PayPal button 2 In the call to the SetExpressCheckout API operation you provide the URL where PayPal can call your callback server the flat rate shipping options and cart line item details 3 You receive a token in the response 72 October 2009 Express Checkout Integration Guide Implementing the Instant Update API Following Instant Update API Best Practices The buyer is redirected to PayPal When the buyer first logs in to the PayPal site PayPal obtains the buyer s shipping address and sends it in the callback request red down arrow to your callback server at the specified URL NOTE If the buyer changes their shipping address on the PayPal Review page PayPal will make subsequent calls to the callback request You respond to the callback red up arrow with the shipping option rates based on the buyer s shipping address You can also adjust the tax amount and send insurance options Depending on your business processes you may send an API call to your carrier to calculate the rates and options based on the shipping address PayPal updates the Review Page t
36. CORRELATIONID Correlation ID which uniquely identifies the transaction to PayPal TIMESTAMP The date and time that the requested API operation was performed VERSION The version of the API BUILD The sub version of the API URL Decoding All responses to HTTP POST operations used by the PayPal NVP API must be decoded The PayPal NVP API uses the HTTP protocol to send requests and receive responses from a PayPal API server You must decode all data returned using the HTTP protocol so that it can be displayed properly Most programming languages provide a way to decode strings NOTE Most browsers decode responses to HTTP requests automatically 34 October 2009 Express Checkout Integration Guide Implementing the Simplest Express Checkout Integration The simplest Express Checkout integration requires the following PayPal API operations SetExpressCheckout DoExpressCheckoutPayment and optionally GetExpressCheckoutDetails e Setting Up the Express Checkout Transaction e Obtaining Express Checkout Transaction Details e Completing the Express Checkout Transaction Setting Up the Express Checkout Transaction To set up an Express Checkout transaction you must invoke the SetExpressCheckout API to provide sufficient information to initiate the payment flow and redirect to PayPal if the operation was successful This example assumes that you have set up the mechanism you will use to communicate with the PayPal server and have a Pa
37. DoReauthorization PayPal API operations you must 1 Check the payment status in the response to the API operation specifically check whether Payment Status is set to Pending 2 If the Payment Status is set to Pending check whether the PendingReason is set to PaymentReview because there are other reasons that a transaction may become pending For example an unsettled authorization s Payment Status is set to Pending however its PendingReason is set to authorization which is not related to payment review If Payment Status is set to Pending and the PendingReason is set to PaymentReview you should not ship merchandise or in the case of electronic media you should not allow download access Because the payment status will change after review you must periodically check the payment status using the Get Transact ionDetails API operation The following diagram shows how to use the payment status to detect payments under review by PayPal Express Checkout Integration Guide October 2009 105 Using Other PayPal API Operations Handling Payment Review DoExpressCheckoutPayment DoReferenceTransaction DoAuthorization DoReautorization API Operation Completed Okay to ship Cancel Reversed Y apala GetTransaction payr Details review Completed Okay to ship Cancel IMPORTANT For best results call the GetTransactionDetails API operation every six hours never call it more frequ
38. P 94666 amp ADDRESSID amp ADDRESSSTATUS Confirmed 6 Invoke a form on your site that invokes t on the Sandbox 42 October 2009 he DoExpressCheckout Payment API operation Express Checkout Integration Guide lt form method post action lt input type hidden name USE lt input type hidden name PWI lt input type hidden nam lt input type hidden name VE lt input type hidden nam lt input type hidden nam lt input type hidden name TOK lt input type hidden nam lt input type submit name ME lt form gt 7 Review the response string from the Do Testing an Express Checkout Integration aaa https api 3t sandbox paypal com nvp gt ER value API_username gt D value API_passwora gt SIGNATURE value API_signature gt RSION value 52 0 gt PAYMENTACTION value Sale gt PAYERID value 7AKUSARZ7SAT8 gt IN value EC 2d1NK66318YB717835M gt AMT value 19 95 gt HOD value DoExpressCheckoutPayment gt ExpressCheckoutPayment API operation If the operation was successful the response should include ACK set to Success as follows TIMESTAMP 2007 2d04 2d05T23 3a30 3a162Z amp CORRELATIONID 333 b808bb23 amp VERS amp BUIL ION 52 2e0 D 1 2e0006 00000 amp TOKEN EC 2d1NK66318YB717835M amp TRANSACTIONID 043144440L4877429 amp TRANSACTIONTYPI amp PA
39. PayPal Express Checkout Integration Guide Express Checkout Integration Guide Document Number 100010 en_US 200910 2009 PayPal Inc All rights reserved PayPal is a registered trademark of PayPal Inc The PayPal logo is a trademark of PayPal Inc Other trademarks and brands are the property of their respective owners The information in this document belongs to PayPal Inc It may not be used reproduced or disclosed without the written approval of PayPal Inc Copyright PayPal All rights reserved PayPal Europe S r l et Cie S C A Soci t en Commandite par Actions Registered office 22 24 Boulevard Royal L 2449 Luxembourg R C S Luxembourg B 118 349 Consumer advisory The PayPal payment service is regarded as a stored value facility under Singapore law As such it does not require the approval of the Monetary Authority of Singapore You are advised to read the terms and conditions carefully Notice of non liability PayPal Inc is providing the information in this document to you AS IS with all faults PayPal Inc makes no warranties of any kind whether express implied or statutory with respect to the information contained herein PayPal Inc assumes no liability for damages whether direct or indirect caused by errors or omissions or resulting from the use of this document or the information contained in this document or resulting from the application or use of the product or service described herein
40. Whether or not you choose to include the outstanding amount with the payment for the next billing cycle you can also use the BillOutstandingAmount API to programmatically collect that amount at any time Recurring Payments Profile Status The recurring payments actions you may take depend on the status of the profile A recurring payments profile can have one of the following status values e ActiveProfile e PendingProfile e ExpiredProfile e SuspendedProfile e CancelledProfile If the profile is successfully created it has an ActiveProfile status However if a non recurring initial payment fails and FATLEDINITAMTACTION is set to CancelOnFailure in the CreateRecurringPaymentsProfile request the profile is created with a status of PendingProfile until the initial payment either completes successfully or fails A profile has a status of ExpiredProfile when both the total billing cycles for both the optional trial period and the regular payment period have been completed You can suspend or cancel a profile by using the ManageRecurringPayment sProfileStatus API You can also reactivate a suspended profile If the maximum number of failed payments has already been reached however you will need to increase the number of failed payments before reactivating the profile NOTE You can also suspend cancel or reactive a recurring payments profile through the PayPal website For recurring payments
41. Y amp ORDE po amp AMT amp CURRI 9 32e95 H e T 0 2e00 Express Checkout Integration Guide T 0 2e43 ENTTYPE instant IME 2007 2d04 2d05T23 3a30 3a14Z NCYCODE USD ENTSTATUS Completed END INGREASON None amp REASONCODE None amp ACK Success E expresscheckout October 2009 43 a Testing an Express Checkout Integration 44 October 2009 Express Checkout Integration Guide Customizing Express Checkout You can specify options in Express Checkout API requests that change the appearance behavior and flow of the checkout process e PayPal Review Page Order Details e PayPal Page Style e Changing the Locale e Handling Shipping Addresses e Automatically Filling Out the PayPal Login Page e User Confirms Order on PayPal PayPal Review Page Order Details NOTE The DoExpressCheckoutPayment request includes the same order details and eBay auction incentive parameters as SetExpressCheckout It is strongly recommended that you submit the same parameters in both API calls When a buyer logs into PayPal to check out you can present the buyer with detailed information about each item in the shopping cart see PayPal Review page with order details 1 Item name The item name can identify this item to distinguish it from other line items in the order 2 Item number Each item can be further identified by an item number If the
42. amp L_AMT0 9 95 amp L_ TY0 2 amp L_NAME1 Coffee Filter bags amp L_NUMBER1 6230 amp L_DESC1 Size Two 24 piece boxes amp L_AMT1 39 70 amp L_QTY1 2 amp L_ITEMWEIGHTVALUE1 0 5 amp L_ITEMWEIGHTUNIT1 l1bs amp ITEMAMT 99 30 amp TAXAMT 2 59 amp MAXAMT 150 00 amp SHIPPINGAMT 8 00 amp SHIPDISCAMT 3 00 amp AMT 107 89 amp CURRENCYCODE USD S amp ALLOWNOTE 1 SCALLBACK https amp CALLBACKTIMEOUT 4 amp INSURANCEOPTIONOFFERED t rue amp INSURANCEAMT 1 00 amp L_SHIPPINGOPTIONISDEFAULT0 false amp L_SHIPPINGOPTIONNAME0 Ground amp L_SHIPPINGOPTIONLABELO UPS Ground 7 Days amp L_SHIPPINGOPTIONAMOUNTO 3 50 amp L_SHIPPINGOPTIONISDEFAULT1 true amp L_SHIPPINGOPTIONNAME1 UPS Air amp L_SHIPPINGOPTIONIABEL1 UPS Next Day Air Freight amp L_SHIPPINGOPTIONAMOUNT1 8 00 w m Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P October 2009 Express Checkout Integration Guide Implementing the Instant Update API Using the Callback Callback Request The PayPal sends the parameters in the callback request to the location you specified for CALLBACKURL The callback request parameters include e The line item details you sent in the call to SetExpressCheckout PayPal also sends back any line item description details you may have specified such as the L_ITEMWEIGHTUNIT1 and L_ITEMWEIGHTVALUE1 values sh
43. ased aame pass ycc d signature or if certificate you re d Need help deciding which credential is right for your needs Learn more By clicking Agree and Submit agree to the AP License Agreement and Terms of Use Express Checkout Integration Guide October 2009 29 4 PayPal Name Value Pair API Basics Creating an NVP Request 5 To complete the process click Done View or Remove API Signature Back to Profile Summary For preconfigured shopping carts Copy and paste the API username password and signature into your shopping cart configuration or administration screen For building custom shopping carts Store the following credential information in a pecure location with limited access smth ii_apil venzon net VL4SAZXXDD7RES6P AkagkMy p 2 d8gDM E tin LACIOdA3a00hE ok Gka0E OJsSFHuVxmSACI 22 200 SOTO D Done Remove Make a note of the API username API password and signature You will need to include this information whenever you execute a PayPal API operation Creating an API Certificate You must establish credentials to use the PayPal API however only create an API certificate if your site requires it most often you will want to create an API signature for your credentials If you really need a certificate follow the instructions at https www paypal com IntegrationCenter ic_api certificate html NOTE The certificate you use for API credentials is not the same as an SSL certificate for your
44. ased on shipping address in the callback response Callback Times Out If the callback does not return within the timeout period PayPal displays the flat rate shipping options you specified in the call to SetExpressCheckout in the drop down menu on the PayPal Review page The PayPal Review page in the figure below shows two flat rate shipping options the buyer can choose from if the callback times out Note also that a flat rate amount of 1 00 is offered for insurance Express Checkout Integration Guide October 2009 75 76 Implementing the Instant Update API Using the Callback PayPal Review page when callback times out Your Website Review your information ifthe information below is correct click Continue You will confirm your payment on The net page View PayPal policies and your payment source rights Description Uni Price 10 Decaf Kona Blend Coffee 9 95 Rem 623083 Size 6 Boz Coffee Fier bags 39 70 Rem 523083 Size Two 24 piece boxes lel 2 v Quartty item total Tax Shipping and handling UPS Nest Day Air 8 00 USD r 9 v UPS Ground 7 Days 3 50 USO Insurance Yes 1 00 USD Payment Method CreditDedit Card Visa XO0KI0OK I00 2477 Change Ship to J Sith 1 Main St San Jose CA 95131 United States Change Contact Information jsmithOt exarnple com 408 000 0000 Cancel and return to your website PayPal The sater easier way to pay For more information read ou
45. ate buyer approval for the payment On your order confirmation page obtain the payment authorization from PayPal and use PayPal API Express Checkout operations to obtain the shipping address and accept the payment Test your integration using the PayPal sandbox Because PayPal offers you the flexibility and opportunity to control your checkout process you should understand how your current checkout flow works and become familiar with the Express Checkout flow Start by reviewing Express Checkout Flow For additional background information that will help you get started see Express Checkout Building Blocks October 2009 Express Checkout Integration Guide Introducing Express Checkout E Getting Started Configuring and Customizing the Express Checkout Experience After you implement and test your basic Express Checkout integration you should evaluate the additional features provided by Express Checkout Express Checkout can be configured and customized to fit into your site Carefully evaluate each option because the more you do to streamline the checkout process and make Express Checkout seamless to your customers the more likely your sales will increase At a minimum you should set your logo on the PayPal site and provide order details in the transaction history If you do not need the benefits associated with paying on your site consider using the PayPal confirmation page as your Order Review page to further streamline the user
46. de Handling Payment Settlements You can use PayPal API operations to handle the capture of payments authorized using Express Checkout and manage Express Checkout authorization and order payment actions e Sale Payment Action e Authorization Payment Action e Order Payment Action Sale Payment Action A sale payment action represents a single payment that completes a purchase for a specified amount A sale is the default Express Checkout payment action however you can also specify the following action in your SetExpressCheckout and DoExpressCheckoutPayment requests PAYMENTACTION Sale A sale is the most straightforward payment action Choose this payment action if the transaction including shipping of goods can be completed immediately To use this payment action e The final amount of the payment must be known when you invoke the DoExpressCheckoutPayment API operation e You should intend to fulfill the order immediately such as would be the case for digital goods or for items you have in stock for immediate shipment After you execute the DoExpressCheckoutPayment API operation the payment is complete and further action is unnecessary You cannot capture a further payment or void any part of the payment when you use this payment action Authorization Payment Action An authorization payment action represents an agreement to pay and places the buyer s funds on hold for up to three days To set up an authorizatio
47. der specify the following payment action in your SetExpressCheckout and DoExpressCheckoutPayment requests PAYMENTACTION Order An order enables you to create multiple authorizations over the 29 days each authorization you create places the buyer s funds on hold for up to three days You can capture multiple payments for each authorization up to 115 of or USD 75 more than the amount you specify in the DoExpressCheckoutPayment request NOTE The default number of child authorizations in your PayPal account is 1 To do multiple authorizations please contact PayPal to request an increase This payment action provides the most flexibility and should be used when either a sale or one authorization plus one reauthorization do not meet your needs Situations in which orders are appropriate include the handling of e Back orders in which available merchandise is sent immediately and the remaining merchandise is sent when available which may include more than two shipments e Split orders in which merchandise is sent in more than one shipment perhaps to different addresses and you want to collect a payment for each shipment October 2009 Express Checkout Integration Guide Handling Payment Settlements cama Order Payment Action e Drop shipments which are shipments from other vendors for which you accept the payment You cannot reauthorize an authorization You handle the need to reauthorize for example when the hold period or valid
48. detailed information about each item sold in eBay auctions If you set the value for SHIPPINGAMT in the call to SetExpressCheckout for example you do not need to be concerned about the shipping cost for individual items eBay calculates incentives based on its database not from the values you pass in the SetExpressCheckout call The following SetExpressCheckout request example passes order details and eBay incentives for two eBay auction items Express Checkout Integration Guide October 2009 53 54 Customizing Express Checkout PayPal Page Style Request Parameters requiredSecurityParameters E THOD SetExpressCheckout RETURNURL http coffee2go com CANCELURL http cancel com PAYMENTACTION Sale EMATL jsmith01 example com NAME J Smith amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp L_NAMEO0 Photo amp L_NUMBERO 32768923 amp L_DESCO Plastic Frame An EBay item amp L_AMT0 25 00 amp L_QTYO 1 amp L_EBAYITEMNUMBERO 32768 923 amp L_EBAYITEMAUCTIONTXNIDO0 0 amp L_NAME1 Nokia ND amp L_NUMBER1 32768924 amp L_DESC1 Nokia Mobile An EBay item amp L_AMT1 25 00 amp L_QTY1 1 amp L_EBAYITEMNUMBER1 32768924 amp L_EBAYITEMAUCTIONTXNID1 7225687004 amp CHANNELTYPE eBayItem amp ITEMAMT 50 00 amp SHIPPINGAMT 3 00 amp HANDLINGAMT 3 00 amp AMT 56 00 amp CURRENCYCODE USD amp ALLOWNOTE 1
49. due on this recurring payment profile If this field is not set or is set to CancelOnFailure PayPal will create the recurring payment profile but will place it into a pending status until the initial payment is completed If the initial payment clears PayPal will notify you by IPN that the pending profile has been activated If the payment fails PayPal will notify you by IPN that the pending profile has been canceled The buyer will receive an email stating that the initial payment cleared or that the pending profile has been canceled if the profile was created using Express Checkout Maximum Number of Failed Payments By including the MAXFAT L EDPAYMENTS field in the CreateRecurringPaymentsProfile request you set the number of failed payments allowed before the profile is automatically suspended You receive an IPN message when the number of failed payments reaches the maximum number specified Express Checkout Integration Guide October 2009 97 98 Handling Recurring Payments Recurring Payments Profile Status Billing the Outstanding Amount If a payment fails due to any reason the amount that was to be billed including shipping and tax if applicable is added to the profile s outstanding balance Use the AUTOBILLOUTAMT field in the CreateRecurringPayment sProfile request to specify whether or not the outstanding amount should be added to the payment amount for the next billing cycle
50. e Introducing Express Checkout Express Checkout is PayPal s premier checkout solution which streamlines the checkout process for buyers and keeps them on the merchant s site after making a purchase e The Express Checkout Experience e Getting Started e Express Checkout Flow e Express Checkout Building Blocks NOTE For information about administrative tasks you can perform from your PayPal account such as adding users setting up custom page styles and managing multiple currency balances see the Merchant Setup and Administration Guide The guide is located on the Documentation page linked to the Library tab on Developer Central The Express Checkout Experience Express Checkout makes it easier for your customers to pay and allows you to accept PayPal while retaining control of the buyer and overall checkout flow Consider your buyer s experience before implementing Express Checkout A generic flow probably has the following sequence of pages A generic checkout flow Shopping Cart Collect Shipping addresses Confirmation In a typical checkout flow the buyer 1 Checks out from the shopping cart page 2 Provides shipping information 3 Chooses a payment option and provides billing and payment information 4 Reviews the order and pays 5 Receives an order confirmation In an Express Checkout flow a buyer still checks out at the beginning of the flow and pays on your site however the buyer does not re
51. e e Maximum number of failed payments allowed e Profile description and reference e Number of additional billing cycles e Billing amount tax amount or shipping amount NOTE You cannot modify the billing frequency or billing period of a profile You can modify the number of billing cycles in the profile NOTE For recurring payments with Express Checkout certain updates such as billing amount are not allowed within 3 days of the scheduled billing date and an error is returned You can modify the following profile information during the trial period or regular payment period e Billing amount excluding tax and shipping e Number of billing cycles Express Checkout Integration Guide October 2009 99 100 Handling Recurring Payments Billing the Outstanding Amount of a Profile The profile changes take effect with the next payment after the call to update the profile Say for example the buyer has made one trial payment out of a total of three UpdateRecurringPayment sProfile is called to increase the number of billing cycles to five As a result the buyer will have four additional trial payments to make If the call to UpdateRecurringPaymentsProfile is made during the regular payment period the changes take effect with the buyer s next scheduled regular payment For complete details see the Name Value Pair Developer Guide and Reference or the SOAP API Reference Updating Addresses When you update the subscrib
52. e October 2009 17 Express Checkout Button and Logo Image Integration Dynamic Images e Static image The dynamic images enable PayPal to change their appearance dynamically If for example you have signed up to participate in a PayPal campaign PayPal can change the appearance of the image dynamically for the duration of that campaign based on parameter information you append to the image URL By default the Express Checkout images appears as shown above The static images cannot be changed dynamically To participate in a PayPal campaign you would have to manually update the image code to change the image displayed and restore the default image when the campaign is over The only way you can have image management taken care of for you is to replace static images in your implementation with dynamic images Dynamic Images To use dynamic images you must pass information to PayPal as parameters appended to the image URL Your unique ID tells PayPal whether or not you are participating in events that require image changes Other information you pass instructs PayPal on the types of images to return If for example you are participating in a PayPal campaign that you have signed up for with PayPal and you have passed the appropriate parameter information to PayPal PayPal automatically updates the image to reflect the campaign information When the campaign is over PayPal restores the default image You are not responsible for scheduling
53. e Transaction Status Notification oaoa a a 110 October 2009 Preface This document describes Express Checkout integration Intended Audience This document is intended for developers and merchants implementing Express Checkout Where to Go for More Information For information on the administrative tasks you can perform from your PayPal account see the Merchant Setup and Administration Guide The guide is available on the Documentation page linked to the Library tab in Developer Central Revision History Revision history for Express Checkout Integration Guide TABLE 1 1 Revision history Date Description 10 05 2009 Added Immediate Payment Edited for technical accuracy Removed PayPal placement guidelines 06 30 2009 Added a section on payment review 6 04 2009 Added a chapter on pre populating the PayPal review page Updated PayPal Review pages Moved some customization topics out of this guide They are now in the Merchant Setup and Administration Guide 04 08 2009 Added a chapter describing the Instant Update Callback API 03 03 2009 Updated to allow useraction continue for eBay incentives 11 13 2008 Added information about integrating dynamic images and added information about order details that can be displayed on the PayPal Review page 06 30 2008 Complete revision Express Checkout Integration Guide October 2009 Pe Revision History 8 October 2009 Express Checkout Integration Guid
54. e even if the buyer is eligible for the incentive Choose the Image To specify the image that you want to display set the value of buttont ype This example sets buttontype to the PayPal Acceptance Mark image https fpdbs paypal com dynamicimageweb cmd _dynamic image amp pal SFJCXFDLNFR5U buttontype ecmark The default value for buttontype is ecshortcut Dynamic Image Command Reference To set up the information that enables dynamic images you add name value pairs to the dynamic image URL Parameters and values are described below 20 October 2009 Express Checkout Integration Guide Express Checkout Button and Logo Image Integration Poe Dynamic Image Command Reference Dynamic Image Parameters The table below describes the dynamic image name value pair parameters Dynamic Image Command Variable Descriptions pal Type encrypted PayPal account number Optional Unique identification number When merchants sign up for a PayPal business account PayPal assigns them an account number The pal value represents the pay to merchant account not a third party making the API request on behalf of this merchant NOTE If pal is not passed PayPal displays the default Check out with PayPal button ordertotal Type numeric Optional The total cost of the order to the buyer If shipping and sales tax are known include them in this value If not this value should be the current subtotal of the order NOTE If ordert
55. e used then do not set ADDROVERRIDE as described in Shipping Address Override To require a confirmed address for the shipping address ensure that the shipping address matches the address on record with PayPal You can do this through your account profile as described in the Merchant Setup and Administration Guide The guide is available on the Documentation page linked to the Library tab on Developer Central Alternately you can set a flag in the call to SetExpressCheckout as described below 1 Include the optional REOQCONFIRMSHIPP ING parameter in the call to SetExpressCheckout 2 Set REQCONFIRMSHIPPING to 1 The following example requires the shipping address be a confirmed address NOTE The value of REOCONFIRMSHIPPING overrides the setting in your Merchant Account Profile Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp PAYMENTACTION Sale amp REQCONF IRMSHIPPING 1 amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA I i I amp SHIPTOCOUNTRYCODE US I I amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 4 08 967 4444 60 October 2009 Express Checkout Integration Guide Customizing Express Checkout aaa Handling Shipping Addresses Response Parameters successRes
56. ed Shipping amp Billing Info Pay lama Paypal Website Views Customer views Tha zafer eanier wry to pay B vour Website d biling order review page Customer pays with ays PayPal laa Giropay edirect Page TT Giropay Giropay Confirmation Payment Complete Enter PIN Enter TAN p Customer views order confirmation Cancelled or Unsuccessful giropay Payment Page Flow If the giropay payment fails for any reason such as insufficient funds or the customer cancels PayPal provides details to the customer to do a bank transfer from their bank account This transaction will remain pending until PayPal receives the funds at which time the transaction will be complete If you have disabled non instant funding transactions for your PayPal account the transaction is cancelled and PayPal redirects the customer to your Order Cancel page After the bank transfer flow is completed the transaction is pending until the customer pushes the funds to PayPal If the customer cancels during the PayPal payment via bank transfer flow your Order Cancel page is displayed 108 October 2009 Express Checkout Integration Guide Integrating giropay with Express Checkout a giropay Integration giropay Integration If you offer the giropay payment option you must take additional steps to integrate with the Express Checkout flow Initiate the Flow with SetExpressCheckout To support giropay payments you pass the following three URL
57. enter shipping billing or payment information because it is already available from PayPal This simplifies and expedites the checkout Express Checkout Integration Guide October 2009 Introducing Express Checkout Getting Started process The buyer can then proceed to review the order on your site You can include other necessary checkout steps You can also up sell to the buyer on your Review Order page The following diagram shows the Express Checkout flow Express Checkout Flow Shopping Cat Order Confirmation Stored Shipping amp Billing infe a 2 Customer reviews Customer Views Customer views We aateenserenytngey chipping and kiling orce review page crder confinnstion Customer pays with into then pays PayPal In the Express Checkout flow the buyer 1 2 3 4 5 Chooses Express Checkout by clicking the Check out with PayPal button Logs into PayPal to authenticate his or her identity Reviews the transaction on PayPal Confirms the order and pays from your site Receives an order confirmation Getting Started You can implement Express Checkout in just four steps 1 2 4 Place PayPal checkout buttons and PayPal payment mark images in your checkout flow For each PayPal button that you place modify your page to handle the button click Use a PayPal API Express Checkout operation to set up the interaction with PayPal and redirect the browser to PayPal to initi
58. ently than once per hour Reversed 106 October 2009 Express Checkout Integration Guide Integrating giropay with Express Checkout You must modify your Express Checkout implementation to use giropay a common German funding source e giropay Page Flows e giropay Integration giropay Page Flows If you accept giropay you must redirect to the giropay website to collect the funds after completing the Express Checkout transaction When your customer selects giropay as a funding source during the Express Checkout flow you redirect the customer to a static PayPal URL after your order review page PayPal then redirects the customer to the giropay website to push the funds to the merchant After the giropay payment is successfully completed the transaction is confirmed If the giropay payment fails or is cancelled by the customer PayPal provides the necessary details for an EFT so that the customer can complete the transaction by pushing funds from his her bank account If your PayPal account profile blocks non instant payments the transactions is cancelled giropay Payment Page Flow The following diagram illustrates the flow of a successful giropay payment Express Checkout Integration Guide October 2009 107 j Integrating giropay with Express Checkout giropay Page Flows Page flow for a successful giropay payment E Paypal Website E Your Website E Giropay Po a Receipt Shopping Cart Stor
59. ep to test Express Checkout 1 Invoke a form on your site that calls the SetExpressCheckout API on the Sandbox To invoke the API set form fields whose names match the NVP names of the fields you want to set specify their corresponding values and then post the form to a PayPal Sandbox server such as https api 3t sandbox paypal com nvp as shown in the following example 40 October 2009 Express Checkout Integration Guide Testing an Express Checkout Integration aaa lt form method post action https api 3t sandbox paypal com nvp gt lt input type hidden name USER value API_username gt lt input type hidden name PWD value API_passwora gt lt input type hidden name SIGNATURE value API_signature gt lt input type hidden name VERSION value 52 0 gt lt input type hidden name PAYMENTACTION value Sale gt lt input name AMT value 19 95 gt lt input type hidden name RETURNURL value http www YourReturnURL com gt lt input type hidden name CANCELURL value http www YourCancelURL com gt lt input type submit name METHOD value SetExpressCheckout gt lt form gt NOTE The API username is a Sandbox business test account for which a signature exists See the Test Certificates tab of the Sandbox to obtain a signature If you are not using a signature you must use a different Sandbox server 2 Review the response string from
60. er shipping address you must enter all of address fields not just those that are changing For example if you want to update the subscriber s street address you must specify all of the address fields listed in the Name Value Pair Developer Guide and Reference or SOAP API Reference not just the field for the street address Updating the Billing Amount For profiles created using Express Checkout the total amount of a recurring payment can only be increased 20 in a fixed 180 day interval after the profile is created The 20 maximum is based on the total amount of the profile at the beginning of the 180 day interval including any shipping or tax amount For example if a profile is created on March 10 with a total amount of 100 then during the 180 day interval from March 10 to September 6 you can increase the payment amount to a maximum of 120 120 of 100 Suppose that during the first 180 day interval you increased the payment amount to 110 Then during the next 180 day interval starting on September 7 in this example you can only increase the amount of the payment to a maximum of 132 120 of 110 Billing the Outstanding Amount of a Profile Use the BillOutstandingAmount API to immediately bill the buyer for the current past due or outstanding amount for a recurring payments profile NOTE You can also bill the buyer for the current past due or outstanding amount for a recurring payments profile from the PayPal
61. er 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 SetExpressCheckout API TOKEN tokenValue Specify the Payer ID returned by PayPal when it redirects the buyer s browser to your site 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 SetExpressCheckout API Optionally you can obtain the Payer ID by calling the GetExpressCheckoutDetails API 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 must have 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 AMT amount 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 PAYMENTACTION Sale PAYMENTACTION Authorization PAYMENTACTION Order Execute the DoExpressCheckoutPayment API to complete the Express Checkout transaction Examine the values returned by the API if the tran
62. events are represented The numbered callouts in the figure directly correspond to the numbered comments below 1 The eBay flow for third party checkout redirects the buyer from an eBay payment review page to your shopping cart page On your shopping cart page the buyer initiates Express Checkout by clicking the Checkout with PayPal button 2 In the call to the SetExpressCheckout API operation you must pass the following Immediate Payment information ALLOWEDPAYMENTMETHOD This is the payment method type For immediate payment the value is InstantPaymentOnly BUYERUSERNAME EBay provides you with this value L_EBAYITEMCARTIDn EBay provides you with this value Additionally in the call to the SetExpressCheckout API operation you must pass the following Express Checkout API parameter data CHANNELTYPE The value of the channel type which is eBayItem L_EBAYITEMNUMBERn This is the eBay item number 82 October 2009 Express Checkout Integration Guide Immediate Payment aan Integrating Immediate Payment into the Express Checkout Flow Buyer s shipping address The SetExpressCheckout response returns a TOKEN The buyer is redirected to PayPal The buyer reviews their payment and clicks Continue A nan A 0 Optionally you may call GetExpressCheckoutDetails The GetExpressCheckoutDetails response returns information about the buyer 7 In the call to DoExpressCheckoutPayment
63. experience This can lead to better order completion also know as conversion rate You can configure the look and feel of PayPal pages to match the look and feel of your site by specifying the e Logo to display e Colors for the background and border e Language in which PayPal content is displayed You should include e Order details including shipping and tax during checkout IMPORTANT Not displaying this information is a major cause of shopping cart abandonment during checkout e Shipping information for non digital goods which can be your address information for the buyer or the address on file with PayPal if you use the address on file with PayPal you can specify whether or not it must be a confirmed address You can also handle special situations including e Associating a payment with an eBay auction item or an invoice number e Accepting payments with giropay Additional PayPal API Operations You can use PayPal API operations to include advanced processing and back office processes with Express Checkout such as e Capturing payments associated with authorizations and orders e Handling recurring payments e Issuing refunds providing a transaction search capability and providing other back office operations Express Checkout Integration Guide October 2009 11 Introducing Express Checkout Express Checkout Flow Express Checkout Flow You initiate the Express Checkout flow on your shopping cart page and
64. f however you set the amount of the payment to 0 in the SetExpressCheckout request you can create a billing agreement without initiating a payment Regardless of whether a payment is included you must call DoExpressCheckoutPayment to complete the transaction NOTE Tocreate a billing agreement without purchase use Version 54 0 or higher of the PayPal API To set up one or more billing agreements for recurring payments modify the SetExpressCheckout request as follows 1 Add an L_BILLINGTYPEn field for each billing agreement you want to create n is a value in the range of 0 to 9 inclusive Set the value of each field to RecurringPayments L_BILLINGTYPEO RecurringPayments 2 Add an L_BILLINGAGREEMENTDESCRIPTIONn field to correspond to each L_BILLINGTYPEn field you pass n is a value in the range of 0 to 9 inclusive Set the value of each field to the description of the goods or services associated with that billing agreement for example L_BILLINGAGREEMENTDESCRIPTIONO Time Magazine subscription 3 If there is no associated purchase set AMT to 0 AMT 0 NOTE When you create the recurring payments profile you must include the same L_BILLINGTYPEn and L_BILLINGAGREEMENTDESCRIPTIONn values in the CreateRecurringPaymentsProfile request The SetExpressCheckout response provides a token t
65. f you specify a partial refund you must specify the amount to refund the currency and a description of the refund which is called a memo When you call the RefundTransaction API PayPal responds with another transaction ID which is associated with the refund not the original transaction and additional information about the refund This information identifies e the gross amount of the refund which is returned to the payer e the amount of the refund associated with the original transaction fee which is returned to you e the net amount of the refund which is deducted from your balance To issue a refund 1 In the RefundTransaction request specify the transaction ID of the transaction whose payment you want to refund TRANSACT IONID transaction_id 2 Specify the kind of refund which is either Full or Partial REFUNDTYPE Full or Express Checkout Integration Guide October 2009 103 104 Using Other PayPal API Operations Handling Payment Review REFUNDTYPE Partial For a partial refund specify the refund amount including the currency AMT amount CURRENCYCODE currency D For a partial refund specify the memo description NOTE description Execute the RefundTransaction operation Check the acknowledgement status in the RefundTransaction response to ensure that the operation was successful Handling Payment Review Payment Review is a feature that identifies high risk transactions and n
66. following fields in the CreateRecurringPayment sProfile request The following table lists the required fields for creating an optional trial period October 200 9 Express Checkout Integration Guide Required fields for specifying a trial period Handling Recurring Payments oe Options for Creating a Recurring Payments Profile NVP SOAP TRIALBILLINGPERIOD ScheduleDetails TrialPeriod BillingPeriod TRIALBILLINGFREQUENCY ScheduleDetails TrialPeriod BillingFrequency TRIALAM ScheduleDetails TrialPeriod Amount TRIALTOTALBILLINGCYCLES ScheduleDetails TrialPeriod TotalBillingCycles Specifying an Initial Payment You can optionally specify an initial non recurring payment when the recurring payments profile is created by including the following fields in the CreateRecurringPaymentsProfile request Required fields for specifying an initial payment NVP SOAP INITAMT ScheduleDetails ActivationDetails InitialAmount FAILEDINITAMTACTION ScheduleDetails ActivationDetails FailedInitAmountAction By default PayPal will not activate the profile if the initial payment amount fails You can override this default behavior by setting the FAT L EDI NITAMTACTION field to Cont inueOnFailure which indicates that if the initial payment amount fails PayPal should add the failed payment amount to the outstanding balance
67. g Payments Profile e Billing the Outstanding Amount of a Profile e Recurring Payments Notifications How Recurring Payments Work When you create recurring payments for a buyer you create a recurring payments profile The profile contains information about the recurring payments including details for an optional trial period and a regular payment period Each of these subscription periods contains information about the payment frequency and payment amounts including shipping and tax if applicable After a profile is created PayPal automatically queues payments based on the billing start date billing frequency and billing amount until the profile expires or is canceled by the merchant The buyer can also cancel the recurring payments profile Note that the queued payments are funded using the normal funding source hierarchy within the buyer s PayPal account After the recurring payments profile is created you can view recurring payments details or cancel the recurring payments profile from your PayPal account You can also access recurring payments reports from the PayPal Business Overview page Also after creating a recurring payments profile you can use the Recurring Payments API to do the following e Get information details about a recurring payments profile e Change the status of a recurring payment profile e Update the details of the recurring payments profile Express Checkout Integration Guide October 2009 89
68. hant Ser es J au tion Tools Overview AddFunds Withdraw History Resolution Cente Enhance Your Account My Account Overview 2 Click API Access from the Profile menu 28 October 2009 Express Checkout Integration Guide PayPal Name Value Pair API Basics Obtaining API Credentials Profile Summary To edit your Profile information ple Account Information Email Street Address Phones and Mobile Payments Password Notifications Lanquage Preference Business Information Close Account 3 Click Request API Credentials Setting up PayPal API Credentials and Permissions Select one of the following options to use PayPal s secure Application Programming Interfaces APIs If you re not sure what you need ask your shopping cart or solution provider Grant API Permission to your shopping cart or solution provider if the cart will make API calls on your behalf Leam more about PayPal API concepts and terminology 4 Check Request API signature and click Agree and Submit Request API Credentials API credentials consist of three elements An API usemame An API password Either an API signature or an API SSL chent side certificate If you g cart or solution provider ask whether you need an API signature or a certificate Request API signature if your shopping cart ORequest API certificate if your shopping or solution provider has g ked for an API cart or solution provider requires a file b
69. hat uniquely identifies the transaction for subsequent redirects and API calls Redirecting the Buyer s Browser to PayPal After you receive a successful response from SetExpressCheckout add the TOKEN from the SetExpressCheckout response as a name Vvalue pair to the following URL and redirect your buyer s browser to it https www paypal com cgi bin webscr cmd _express_checkout token lt value_from_SetExpressCheckoutResponse gt 94 October 2009 Express Checkout Integration Guide Handling Recurring Payments Options for Creating a Recurring Payments Profile For redirecting the buyer s browser to the PayPal login page PayPal recommends that you use the HTTPS response 302 Object Moved with the URL above as the value of the Location header in the HTTPS response Ensure that you use an SSL enabled server to prevent browser warnings about a mix of secure and insecure graphics Getting Buyer Details Using GetExpressCheckoutDetails The GetExpressCheckoutDetails method returns information about the buyer including name and email address stored on PayPal You can optionally call this API after PayPal redirects the buyer s browser to the ReturnURL you specified in the SetExpressCheckout request The GetExpressCheckout Details request has one required parameter TOKEN which is the value returned in the SetExpressCheckout response Creating the Profiles With CreateRecurringPaymentsProfile After your buyer ha
70. hipping address parameters are overridden by the values shown in the above example 64 October 2009 Express Checkout Integration Guide Customizing Express Checkout em Automatically Filling Out the PayPal Login Page PayPal review page with shipping address override WebsiteName com Review Your Information PayPal scoue Payments Please review the information below If correct click Continue to complete your payment on the WebsiteName com website Learn more about PayPal policies and your payment source rights and remedies Payment Method Credit Card Visa XKXX XXXX XXXX 0084 Shippeng Address 1 Second St Ste 210 San Jose CA 95131 United States Contact Information jomith01 example com Cancel and return to WebsiteName com Automatically Filling Out the PayPal Login Page When you pass the buyer s shipping address and contact information telephone number and email address parameters in the call to SetExpressCheckout PayPal automatically fills out the account creation form fields for the buyer on the PayPal Login page After the call to SetExpressCheckout the buyer is redirected to the PayPal Login page Buyers having a PayPal account can log in with their email address and password Buyers who do not have an account can create one by filling out the form on this page To facilitate filling out the form you can have PayPal automatically fill out the billing address and contact information by passing the shipping
71. ice to accept HTTP requests from PayPal On the live site it needs to be secured by means of SSL 2 Enable the callback service to process PayPal requests and send back responses Express Checkout Integration Guide October 2009 69 Implementing the Instant Update API About the Instant Update API 3 Modify the existing Express Checkout API calls to accommodate new parameters Send the callback URL shipping insurance and tax information to PayPal in the call to SetExpressCheckout Call GetExpressCheckoutDetails to obtain the buyer s final choices for shipping and insurance if applicable Call DoExpressCheckoutPayment with the buyer s final selections 4 Eliminate your shipping options page 5 Test your integration for the callback and flat rate shipping options Post Integration Checkout Experience After you have integrated the Instant Update API you can display the shipping options insurance options and tax on the PayPal Review page The shipping and insurance options appear in drop down menus as shown below 70 October 2009 Express Checkout Integration Guide Implementing the Instant Update API About the Instant Update API PayPal Review page with shipping options insurance and tax Your Website Review your information PayPal amp Secure Payments ifthe information below is correct click Continue You will confirm your payment on he next page View PayPal policies and your payme
72. icks by setting up the Express Checkout transaction and redirecting your buyer s browser to PayPal e On your Payment Methods page associate the PayPal mark with an option Handle selection of the PayPal mark by setting up the Express Checkout transaction and redirecting your buyer s browser to PayPal e After returning from PayPal complete the Express Checkout transaction by obtaining shipping information from PayPal and accepting the payment Express Checkout Building Blocks You implement Express Checkout flows with Express Checkout buttons PayPal API operations PayPal commands and tokens The following conceptual diagram identifies the building blocks that you use to integrate Express Checkout on your website Express Checkout Integration PayPal Flow Add PayPal Checkout button Stopping Cat The ater sssr may s pay Custome pays wth PayPal Call SetExpressCheckout API Catets b Pora Wokoito PayPal redirects customer to merchant site E Your Webste Call GetExpressCheckoutDetails AP Stored Shipping Receipt Contimation amp Billing Info Ei E Pay Customer reviews Customer views Customer vieves ripping and killing order review page order confirmation into then pays Call DoExpressCheckoutPayment API Redirect customer to PayPal NOTE Tokens are not shown in the diagram Express Checkout Buttons PayPal provides buttons and images for you to place on your website
73. in the call to DoOExpressCheckoutPayment NOTE DoExpressCheckoutPayment includes the same order details and eBay auction parameters as SetExpressCheckout It is strongly suggested that if you pass line item detail parameter data in SetExpressCheckout you pass the same parameter data in the call to DoOExpressCheckoutPayment This ensures that order details display on the PayPal Review page and payment is properly reflected in My eBay and in PayPal transaction details For each individual eBay entry pass the values returned by eBay when setting up the auction item descriptions in the parameters below L_EBAY IT TEMNUMBERn and L_EBAYITEMAUCTIONTXNIDn 52 October 2009 Express Checkout Integration Guide Customizing Express Checkout emm PayPal Review Page Order Details For multiple eBay items offered as a single order pass the value returned by eBay when setting up the auction order description in the parameter below L_EBAYTTEMORDERIDn 3 It is recommended that you pass the string eBay item in L_DESCn and the eBay Item Number in L_NUMBERn 4 If you host the final payment confirmation page on your website by setting useraction cont inue in the redirect you must show the discount amount resulting from eBay incentives on that page You can get the discount amount from the PAYPALADJUSTMENT value returned in the response to GetExpressCheckoutDetails NOTE eBay maintains
74. ing Up the Callback aooaa 74 GetExpressCheckoutDetails and DoExpressCheckoutPayment Changes 75 Other Considerations 1 0 75 Using the Callback aoa oa a 76 SetExpressCheckout 2 s ikasiak a aunas 77 Callback Request ss soam aaa nw a a a E a aE a a E 79 Callback Response o oo ce 79 Chapter 8 Immediate Payment anaoa aaa 8242 2 81 Overview of Immediate Payment aoaaa a ee ee 81 How Immediate Payment Works in the Express Checkout Flow 81 Integrating Immediate Payment into the Express Checkout Flow 83 The Call to SetExpressCheckout oaoa 83 The Call to DoExpressCheckoutPayment 0 22 200008 84 Chapter 9 Handling Payment Settlements 85 Sale Payment Action 2 aa a ee 85 Authorization Payment Action a aaa aa a 85 Order Payment ACON sa soa e soa aaora ua a a ee 86 October 2009 5 a Contents Chapter Chapter Chapter 10 Handling Recurring Payments 89 How Recurring Payments Work 2 a 89 LANON s 2 lt i eee Soke Sat ee oe 8 Ga Oe Be Ee eos ae Se Ele 90 Recurring Payments Terms 1 1 aa a 90 Recurring Payments With Express Checkout 0 0 00202 91 Initiating the Processing Flow With SetExpressCheckout 93 Redirecting the Buyer s Browser to PayPal 0 00 005 94 Getting Buyer Details Using GetExpressCheckoutDetails 95 Creating the Profi
75. isa XXXX KXXX XXXX 0084 Change Shipping Address 1 Main Street San Jose CA 95131 United States Change Contact Information jsmthO1 example com Cancel and return to WebsiteName com The following example sets colors for the header background HDRBACKCOLOR and header border HDRBORDERCOLOR Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp MAXAMT amp PAYMENTACTION Sale amp HDRBACKCOLOR FFFF 66 amp HDRBORDERCOLOR 996666 amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 408 967 4444 Express Checkout Integration Guide October 2009 57 58 Customizing Express Checkout Changing the Locale Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P The figure below shows the PayPal Login page with HDRBACKCOLOR and HDRBORDERCOLOR set to custom colors PayPal Login page with custom header background and border colors PayPal is the safer easier way to pay PayPal secure Payments PayPal securely processes payments for WebsiteName com Pay with PayPal in a couple of clicks Why use PayPal You can use your credit card without exposing your card number to the seller You can speed through checkout without stopping to enter your card number or address Sign up for 4
76. item is an eBay auction item it is recommended that you provide the eBay item number in this field 3 Item description This field identifies which of several items the buyer is purchasing For example you may be offering an item in different sizes Knowing the size helps the buyer decide whether the one they selected was appropriate If the item is an eBay auction item it is recommended that you provide the phrase eBay item in this field 4 Item unit price This field specifies exactly how much one unit of the item costs It can be a positive or negative value but not zero 5 Item unit quantity This field identifies the number of units the buyer is ordering PayPal calculates the value in the Amount 6 column as the product of line item unit price and line item unit quantity You can also show other detailed information about the order 7 Item total and tax These are the respective total of all items in the order and the tax 8 Shipping and handling PayPal sums the shipping and handling amounts in this field You determine actual shipping and handling amounts Express Checkout Integration Guide October 2009 45 8 Customizing Express Checkout PayPal Review Page Order Details 9 Shipping discount If the buyer is receiving a discount on shipping the value appears as a credit in this field 10 Insurance If there is insurance on shipping the insurance fee is shown in this field
77. l Name Value Pair API Basics aa PayPal API Client Server Architecture Your Site LLL PayPal API Server Redirect to PayPal PayPal Login Contirm Details PayPal redirects Continue Your Site Pal a PayPa API Server Token Security Typically the API operation that sets up a redirection to PayPal returns a token which is passed as a parameter in the redirect to PayPal The token also may be required in related API operations Express Checkout Integration Guide October 2009 27 4 PayPal Name Value Pair API Basics Obtaining API Credentials Obtaining API Credentials To use the PayPal API you must have API credentials that identify you as a PayPal business account holder authorized to perform various API operations Although you can use either an API signature or a certificate for credentials PayPal recommends you use a signature IMPORTANT You can use either a signature or a certificate however you cannot use a signature and a certificate at the same time Creating an API Signature You must establish credentials to use the PayPal API typically you create an API signature You must have a PayPal business account An API signature is a credential that consists of an API username along with an associated API password and signature all of which are assigned by PayPal To create an API signature 1 Log into PayPal and click Profile Products amp Services My Account Request Money Merc
78. les With CreateRecurringPaymentsProfile 95 Options for Creating a Recurring Payments Profile 95 Specifying the Regular Payment Period 0 200002 ee eae 95 Including an Optional Trial Period a a aaa ee 96 Specifying an Initial Payment 2 2 ee 97 Maximum Number of Failed Payments 2 00000 ee eee 97 Billing the Outstanding Amount 0 0000 eee ee ee 98 Recurring Payments Profile Status oao ee 98 Getting Recurring Payments Profile Information 2 002 000 2 ee 98 Modifying a Recurring Payments Profile 0 20000 eee eee 99 Updating Addresses 2 a a a 100 Updating the Billing Amount 2 2 0 002 00 a 100 Billing the Outstanding Amount of a Profile 22 202008 100 Recurring Payments Notifications 2 2 a 101 11 Using Other PayPal API Operations 103 Issuing Refunds aaua aaa a a 103 Handling Payment Review aoaaa a 104 12 Integrating giropay with Express Checkout 107 giropay Page Flows o sa eci moa a aaaea a e a a e a a a a a e a a 107 giropay Payment Page Flow sasara asati sdas na wenau naa 107 Cancelled or Unsuccessful giropay Payment Page Flow 108 giropay Integration a oaa aaa a a 109 Initiate the Flow with SetExpressCheckout aooaa a 109 Redirect the Customer to PayPal aoaaa aa 00002 eee ee ee 109 Complete the Transaction ooa a 110 Receiv
79. lowing example uses the PayPal Sandbox server https www sandbox paypal com webscr cmd _express checkout amp token lokenValue amp AMT amount amp CURRENCYCODE currencylD amp RETURNURL retum_url amp CANCELURL cancel_url October 2009 Express Checkout Integration Guide Implementing the Simplest Express Checkout Integration 4 Obtaining Express Checkout Transaction Details Obtaining Express Checkout Transaction Details To obtain details about an Express Checkout transaction you can invoke the GetExpressCheckoutDetails API operation This example assumes that PayPal redirects to your buyer s browser with a valid token after the buyer reviews the transaction on PayPal Although you are not required to invoke the GetExpressCheckoutDetails API operation most Express Checkout implementations take this action to obtain information about the buyer You invoke the GetExpressCheckoutDetails API operation from the page specified by return URL which you set in your call to the SetExpressCheckout API 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 1 Specify the token returned by PayPal when it redirects the buyer 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
80. ment status 7 ae Your Site Tracking information Response specific fields The request identifies e The name of the API operation to be performed and its version for example SetExpressCheckout for version 52 0 e Credentials that identify the PayPal account making the request e Request specific information that controls the API operation to be performed A PayPal API server performs the operation and returns a response The response contains e Anacknowledgement status that indicates whether the operation was a success or failure and whether any warning messages were returned e Information that can be used by PayPal to track execution of the API operation e Response specific information required to fulfill the request Multiple API Operations Some of the features you want to implement require multiple API operations Features such as Express Checkout require more than one API operation Typically these features require you to 1 Invoke an API operation such as SetExpressCheckout that sets up the return URL to which PayPal redirects your buyer s browser after the buyer finishes on PayPal Other setup also may be performed 2 Invoke additional API operations after receiving the buyer s permission on PayPal for example GetExpressCheckoutDetails or DoExpressCheckoutPayment The following diagram shows the execution flow between your site and PayPal 26 October 2009 Express Checkout Integration Guide PayPa
81. n specify the following payment action in your SetExpressCheckout and DoExpressCheckoutPayment requests PAYMENTACTION Authorization Express Checkout Integration Guide October 2009 85 86 Handling Payment Settlements Order Payment Action An authorization enables you to capture multiple payments up to 115 of or USD 75 more than the amount you specify in the DoExpressCheckoutPayment request Choose this payment action if you need to ship the goods before capturing the payment or if there is some reason not to accept the payment immediately The honor period for which funds can be held is three days The valid period for which the authorization is valid is 29 days You can reauthorize the 3 day honor period at most once within the 29 day valid period You can void an authorization in which case the uncaptured part of the amount specified in the DoExpressCheckoutPayment request becomes void and can no longer be captured If no part of the payment has been captured the entire payment becomes void and nothing can be captured API operations associated with authorization payment actions API Operation Description DoCapture Capture an authorized payment DoReauthorization Reauthorize a payment DoVoid Void an order or an authorization Order Payment Action An order payment action represents an agreement to pay one or more authorized amounts up to the specified total over a maximum of 29 days To set up an or
82. n PayPal Review page with order details The item unit price can be a positive or a negative value but not 0 You may provide a negative value to reflect a discount on an order for example Item unit quantity Sum of cost of all items in this order Sum of tax for all items in this order Total shipping cost for this order PayPal calculates the sum of the shipping cost and the handling cost below in the PayPal Review page as shown at 8 in PayPal Review page with order details Pass in a shipping amount that is reasonably accurate because you may need to change it later on your final checkout page You might assume for example the buyer lives in California because your business is in California Total handling cost for this order PayPal calculates the sum of the handling cost and the shipping cost above as shown at 8 in PayPal Review page with order details Shipping discount for this order You specify this value as a negative number Total shipping insurance cost for this order Total of order including shipping handling tax and any other billing adjustments such as a credit due Provide a value of 1 to indicate that the buyer may enter a note to you on the PayPal Review page during checkout See Special Instructions text box The following example shows how to set the above parameters in the call to Set ExpressCheckout Express Checkout Integration Guide October 2009 49 50 Customizing Expre
83. n 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 htm1 param value syntax The parameters become available as request parameters on the page specified by the Return URL RETURNURL returm_url Specify the cancel URL The cancel URL is the page to which PayPal redirects your buyer s browser if the buyer does not approve the payment Typically this is the secure page https on your site from which you redirected the buyer to PayPal NOTE You can pass SetExpressCheckout request values as parameters in your URL to have the values available if necessary after PayPal redirects to your 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 PAYMENTACTION Sale PAYMENTACTION Authorization PAYMENTACTION Order Execute the SetExpressCheckout API operation to set up the Express Checkout transaction Test that the response to the SetExpressCheckout API operation was successful If calling the SetExpressCheckout API was successful redirect the buyer s browser to PayPal and execute the _express checkout command using the token returned in the SetExpressCheckout response NOTE The fol
84. nged using API No Yes Profile update using API No Yes Initial payment either succeeded or failed Yes Yes Payment either succeeded or failed during either trial Yes Yes period or regular payment period Outstanding payment either succeeded or failed Yes Yes Maximum number of failed payments reached Yes No NOTE API transactions such as ManangeRecurringPayment sProfileStatus do not trigger IPN notification because the success or failure of the call is immediately provided by the API response Express Checkout Integration Guide October 2009 101 10 Handling Recurring Payments Recurring Payments Notifications 102 October 2009 Express Checkout Integration Guide Using Other PayPal API Operations You can use additional PayPal API operations to implement additional features for your buyers or to provide back office support e Issuing Refunds e Handling Payment Review Issuing Refunds You can use the RefundTransaction PayPal API operation to issue refunds 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 NOTE You cannot make a refund if the transaction occured more than 60 days ago You can refund amounts up to the total amount of the original transaction If you specify aa full refund the entire amount is refunded I
85. nt Update API Using the Callback METHOD CallbackResponse amp OF FERINSURANCEOPTION t rue HIPPINGOPTIONNAMEBO UPS Air HIPPINGOPTIONLABELO UPS Next Day Air Freight HIPP INGOPTIONAMOUNT0 20 00 AXAMTO 2 20 URANCEAMOUNTO 1 51 PPINGOPTIONISDEFAULTO false PPINGOPTIONNAME1 UPS Expedited PPINGOPTIONLABEL1 UPS Express 2 Days PP INGOPTIONAMOUNT1 10 00 AXAMT1 2 00 URANCEAMOUNT1 1 35 PPINGOPTIONISDEFAULT1 t rue PPINGOPTIONNAME2 UPS Ground PPINGOPTIONLABEL2 UPS Ground 2 to 7 Days PP INGOPTIONAMOUNT2 9 99 2 1 99 URANCEAMOUNT2 1 28 PPINGOPTIONISDEFAULT2 false aes HNnwWNN iva H Z n Ea Gt Et nw to oe H HHH MN U H H io H Z ka p nw E 7 H HHH MN oa n G ion wn D ira J ira i vn H G RERI R S BS S SM SI SI SM SI SI R SM SI SJ KS KS tA Re wn G Z HU 80 October 2009 Express Checkout Integration Guide Immediate Payment Immediate Payment ensures buyer payment for an item you are selling on eBay at the time the buyer commits to the item to avoid unpaid items that drive up the operational cost of your business You integrate Immediate Payment as additional Express Checkout parameters and use your own off eBay checkout flow e Overview of Immediate Payment on page 81 e Integrating Immediate Payment into the Express Checkout Flow on page 83 NOTE Immediate Payment is available with API version 60 0 and later
86. nt Update API is a callback you can use to obtain the buyer s shipping address e About the Instant Update API e How the Callback Works in the Express Checkout Flow e Following Instant Update API Best Practices e Setting Up the Callback e Using the Callback About the Instant Update API The Instant Update API is a server call to your web service that provides an instant update to the PayPal review page It enables you to specify a URL for PayPal to call your web service with the buyer s shipping address so you can provide the buyer with more detailed shipping insurance and tax information NOTE The Instant Update API enhances the Express Checkout flow from the shopping cart page The Instant Update API works as follows 1 As the buyer logs in to PayPal the PayPal server calls a URL to your web service with the buyer s default shipping address as stored in the PayPal system 2 Your callback server responds with the available shipping options for that address along with any insurance options and tax adjustments on the order 3 PayPal displays this information on the Review page so buyers can choose from the options 4 The buyer s final choices are returned in the GetExpressCheckoutDetails response Integration Steps Integrating the Instant Update API requires some preparation and modification to the Express Checkout API calls To integrate the server API follow these steps 1 Set up a secure fast web serv
87. nt source rights Description Und Price Quartty Amourt 10 Decaf Kona Blend Coffee 9 95 2 19 90 Rem 623083 Size 6 Boz Coffee Fier bags 39 70 2 79 40 Rem 523083 Size Two 24 piece boxes re archani item totat 99 30 Tax 2 00 Shipping and handling 10 00 UPS Express 2 Days 10 00 USD UPS Next DayAir Freight 20 00 USD 3 00 UPS Express 2 Days 10 00 USE UPS Ground 2 to 7 Days 9 99 USD 1 35 Yes USD v Totak 109 65 USD nier ifi p rd or dis in Payment Method CredivDebit Card Visa OOK 000 004 2477 Change Ship to J Smh 1 Main St San Jose CA 95131 United States Change Contact Information ismithOt exarnple com 408 000 0000 Cancel and return to your wetste PayPal The sater easier way to pay For more information read our User Agreement and Privacy Potcy You can control what options are presented to the buyer as the options can be instantly updated on the page Express Checkout Integration Guide October 2009 71 Implementing the Instant Update API How the Callback Works in the Express Checkout Flow How the Callback Works in the Express Checkout Flow The figure below shows how the callback integrates into the Express Checkout flow Callback integrated into Express Checkout flow Place Order Order P Confirmation Ship Tax Ins Continue S Merchant AJAX Call Redirects to PayPal ko PayPal Server Set EC Shipping Get Do Callback URL Address E
88. o show the options and rates based on your response The buyer makes final selections and clicks Continue You must call GetExpressCheckoutDetails to obtain the buyer s final shipping option selections 10 You call DoExpressCheckoutPayment to perform the transaction Following Instant Update API Best Practices When implementing the Instant Update API PayPal recommends that you follow best practices Use the following best practices as a checklist as you integrate the API Meet the Pre requisites Provide order line item details to take advantage of the Instant Update API The example in this document uses the order line item details example described in PayPal Review Page Order Details on page 45 Streamline the Checkout Flow Existing partners and merchants with Express Checkout integrations can eliminate the current shipping options page Use the Default Callback Timeout Use the default callback response time of 3 seconds Follow PayPal Defined Semantics and Syntax Adhere to well formed variable names and syntax rules in the callback response to PayPal If any errors occur in the response PayPal will use the flat rate shipping options Call GetExpressCheckoutDetails You must call GetExpressCheckoutDetails to find out what options the buyer selected on the PayPal Review page Ensure a Consistent and Good Buyer Experience When the flat rate shipping options are used you should honor the rates to ens
89. odName_ S nvpStr_ Sversion urlencode 52 0 NVPRequest for submitting to server Snvpreq METHOD SmethodName_ amp VERSION Sversion SnvpStr_ Specifying an API Credential You must specify API credentials in each request to execute a PayPal API operation When you execute a PayPal API operation you use credentials such as a signature to authenticate that you are requesting the API operation The following diagram shows the API credentials part of an NVP request Your Site i NVP Request Gz API operation EEN USER sdk three_api1 sdk com PayPal eaaet PWD QFZCWN5HZM8VBG7Q SIGNATURE A IzJhZZjhg29 Request specific fields er Express Checkout Integration Guide October 2009 31 32 PayPal Name Value Pair API Basics Creating an NVP Request To enable PayPal to authenticate your request 1 Specify the API user name associated with your account USER API_username 2 Specify the password associated with the API user name PWD API_password 3 If you are using an API signature and not an API certificate specify the API signature associated with the API username SIGNATURE API signature Specifying Credentials in PHP SAPI_UserName urlencode my_api_username replace with API username SAPI_Password urlencode my_api_password replace with password SAPI_Signature urlencode my_api_signature replace with actual sig NVPRequest for submitting to serverSnvpreq
90. on your payment options page Express Checkout consists of one flow with two entry points e At the beginning of the checkout flow the buyer clicks the Checkout with PayPal button e Upon payment the buyer selects PayPal as a payment option You must integrate Express Checkout from both entry points They are explained separately for simplicity Checkout Entry Point Buyers initiate the Express Checkout flow on your shopping cart page by clicking the Checkout with PayPal button The following diagram shows how Express Checkout integrates with a typical checkout flow Integrating Express Checkout from the Shopping Cart page ee a e Create 2 gt am e PayPal Login PayPal Review st 1g address checkout ri nna LLAN Checkout Confirmation Add To Cart gt Purchase Merchant Review Confirmation i The safer easier way baw d to pay Shopping Cart yment M Payment Option Entry Point Buyers initiate the Express Checkout flow on your payment methods page by selecting PayPal as the default option The following diagram shows how to integrate Express Checkout from your payment methods page October 2009 Express Checkout Integration Guide Introducing Express Checkout Express Checkout Flow Integrating Express Checkout from the Payment Methodss page EE Create taga 2 m e PayPal Login PayPal Review y en M E n a gt crecrou gt gt D gt contnesen Add To Cart n Collect Shipping Me
91. or making changes to your website application code before during or after the campaign It is all handled for you when you set up the dynamic image If you require localized campaign images you can have the localized button image display for each country in which you participate Simply assign the correct code for the country to the locale parameter you append to the dynamic image URL PayPal will return to the default button image associated with each locale when the campaign is not available Configuring the Dynamic Image To set up the dynamic image you provide the name value pair parameter information in the image URL You can pass information in the image URL for any of the following options e Set Up the Default Image e Set Up Image for Dynamic Use e Change the Locale e Feedback to Buyer Meeting an Incentive e Choose the Image October 2009 Express Checkout Integration Guide Express Checkout Button and Logo Image Integration Poe Configuring the Dynamic Image Set Up the Default Image The following URL points to the default Check out with PayPal image https fpdbs paypal com dynamicimageweb cmd _dynamic image To make the image dynamic you need only add parameters to this URL to specify the changes you want displayed To test in the Sandbox environment send the image to the following Sandbox URL https fpdbs sandbox paypal com dynamicimageweb cmd _dynamic image Set Up Image for Dynamic Use To set
92. otal is not passed PayPal does not display the incentive image even if the buyer is eligible for the incentive Character length and limitations Must not exceed 10 000 00 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 locale Type string Optional The five character locale code See Locale Codes Any other values default to US NOTE The merchant can participate in one campaign per country buttontype Type string Optional Indicates a dynamic image The values are e Default Check out with PayPal button image ecshortcut e PayPal Acceptance Mark image ecmark Locale Codes The table below lists the locale values Country code is the two letter code for the country Language priority is the language associated with the country code where language_0 is the default Express Checkout Integration Guide October 2009 21 22 Express Checkout Button and Logo Image Integration Dynamic Image Command Reference Couniry codes language priorities and locale values Country code Language priority Locale AT language_0O de_DE AT language_1 en_US AU language_0O en_AU BE language_0O en_US BE language_1 nl NL BE language_2 fr_ FR C2 language_0O en_US C2 language_1 zh_XC C2 language_2 fr_XC C2 language_3 es_XC CH language_0O de_DE CH language_1 fr_FR CH language_2 en_US CN language_0O zh_CN default
93. otifies you so that you can hold shipments until the risk has been evaluated by PayPal You are immediately notified that a payment is under review and you should not ship merchandise or in the case of electronic media you should not allow download access while the payment is under review You are notified of the resolution within 24 hours You can determine the status of a payment in the following ways by logging into https www paypal com and viewing the status information in the Transaction History by email sent by PayPal by Instant Payment Notification IPN message by Payment Data Transfer PDT message by checking the status of a transaction programatically Programatically the merchant can determine the status of a payment by checking the initial status of a transaction using any of the following the API operations DoExpressCheckoutPayment DoReferenceTransaction DoAuthorization DoReauthorization You can check the subsequent status of a transaction programatically by calling the Get TransactionDetails API operation October 2009 Express Checkout Integration Guide Using Other PayPal API Operations AE Handling Payment Review NOTE You must use version 58 0 to obtain the initial status information provided by DoExpressCheckoutPayment DoReferenceTransaction DoAuthorization or DoReauthorization To use payment review with the DoExpressCheckoutPayment DoReferenceTransaction DoAuthorization and
94. oto 25 00 1 2500 Nokia ND 25 00 1 2500 item totat 50 00 Shipping and handling 6 00 Totat 56 00 USD Enter gif certificate reward or discount Emer redemption code CSTDCOUPON Or select from this ist Apply aes After entering a redemption code or selecting the incentives the PayPal Review page reflects changes to the order Incentives appear as credits and a new Total is calculated as shown below Express Checkout Integration Guide October 2009 51 a Customizing Express Checkout PayPal Review Page Order Details New Total after applying incentives Voyage Travel Review your payment PayPal secu Payments If the information below is correct click Pay now to complete your payment View PayPal policies and your payment source rights Photo 25 00 1 25 00 Nokia ND 25 00 1 25 00 item total 50 00 Shipping and handling 5 00 Subtotal 56 00 Std Coupon Remove 1 00 Total 55 00 USD Integrating eBay Incentives into the Express Checkout Flow To integrate eBay incentives into the checkout flow 1 Pass the following parameters and settings in the call to SetExpressCheckout PAYMENTACTION must be Sale CHANNELTYPE must be eBayItem NOTE For eBay auctions you cannot set PAYMENTACTION to Authorization or Order You must set PAYMENTACTION to Sale 2 For each eBay line item do one of the following mutually exclusive choices in the call to SetExpressCheckout and
95. out API operations and by the _ExpressCheckout command to identify the transaction The life of the token is approximately three hours 16 October 2009 Express Checkout Integration Guide Express Checkout Button and Logo Image Integration PayPal hosts the PayPal button and logo images that you use on your website Using PayPal s buttons and logos is convenient and standardizes appearance on websites that use PayPal as a payment option e About PayPal Button and Logo Images e Dynamic Images e Configuring the Dynamic Image e Dynamic Image Command Reference e Static PayPal Buttons and Images Source Requirements About PayPal Button and Logo Images To inform buyers that PayPal is accepted on your website you must place PayPal button and logo images in your checkout flow PayPal Express Checkout requires that you integrate two images The Check out with PayPal button and the PayPal Acceptance mark Express Checkout Images The Check out with PayPal button is the image you place on your shopping cart page The US version of the image looks like this PayPal also provides buttons for other locales The safer easier way to pay The PayPal Acceptance Mark is the image you place on your payment methods page It looks like this Paypar Express Checkout Image Flavors The Check out with PayPal button and the PayPal Acceptance mark images are available in two flavors e Dynamic image Express Checkout Integration Guid
96. own in the example below By passing this data back to you PayPal expedites your callback response by eliminating the need for you to perform a database query to get this information e The shipping address of the buyer Using the information in the callback request you can calculate the rates and options yourself or send the information in an API call to your carrier to perform the calculations for you This is an example callback request ETHOD CallbackRequest amp CALLBACKVERSION 57 0 amp TOKEN EC 0EE85728D547104V amp CURRENCYCODE USD amp LOCALECODE en_US amp L_NAME0 10 Decaf Kona Blend Coffee amp L_NUMBERO 623083 amp L_DESCO Size 8 8 o0z amp L_AMT0 9 95 amp L_QTY0 2 amp L_NAMF1 Coffee Filter bags amp L_NUMBER1 6230 amp L_DESC1 Size Two 24 piece boxes amp L_AMT1 39 70 amp L_QTY1 2 amp L_ITEMWEIGHTUNIT1 l1bs amp L_ITEMWEIGHTVALUE1 0 5 amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRY US amp SHIPTOZIP 95131 amp SHIPTOSTREET2 Callback Response Each time your web service receives a request from PayPal it must process the request and respond with the appropriate details This is an example callback response Express Checkout Integration Guide October 2009 79 Implementing the Insta
97. ponseFields amp TOKEN EC 6UA07551EA393551U The figure below shows the PayPal review page when REQCONFIRMSHIPPING is set to 1 PayPal review page with a required address WebsiteName com Review Your Information PayPal secure Payments Please review the information below If correct click Continue to complete your peyment on the WebsiteName com website Learn more about PayPal policies and your payment source nights and remedies Payment Method Credit Card Vise XX XX XXXX XXXX 0084 Changs Shipping Address 1 Main Street San Jose CA 95131 United States Change Contact Information jsmith example com Cancel and retum to WebsiteName som Suppressing the Buyer s Shipping Address You can suppress the display of the buyer s shipping address on the PayPal pages You might want to do this in these cases e You are selling a product or service that does not require shipping e You prefer to handle addresses completely on your own and do not want to let buyers choose from their PayPal address book To suppress the display of the buyer s shipping address set the NOSHIPP ING parameter to 1 in the call to SetExpressCheckout No shipping address displays on the PayPal pages whatsoever The following example suppresses the shipping address Express Checkout Integration Guide October 2009 61 o 6 Customizing Express Checkout Handling Shipping Addresses Request Parameters requiredSecurityParamete
98. r User Agreement and Privacy Potcy Totak r discount PayPal E secu amen 19 90 79 40 99 30 2 59 3 00 1 00 107 89 USD Continue Using the Callback October 2009 Express Checkout Integration Guide Implementing the Instant Update API Using the Callback To use the callback you add parameter fields to SetExpressCheckout provide PayPal a URL for sending a callback request and send PayPal the callback response in Name Value pair NVP format SetExpressCheckout In the call to SetExpressCheckout set the following parameters e Set the CALLBACKURL field to the URL where PayPal can call your web service PayPal makes the HTTPS callback request each time either of the following events occur The buyer changes their shipping address The buyer enters a new shipping address e Provide values for the following required parameters Provide values for the line item details parameters such as L_NAMEn L_NUMBERn L_DESCn L_AMTn and L_QTYn shown in the example below Provide values for the flat rate shipping options n L_SHIPPINGOPTIONISDEFAULTn L_SHIPPINGOPTIONNAMEn L_SHIPPINGOPTIONLABELn and L_SHIPPINGOPTIONAMOUNT Set SHIPPINGAMT to the amount set for the default flat rate shipping option If for example L_SHIPPINGISDEFAULT1 t rue and L_SHIPPINGOPTIONAMOUNT1 8 00 then SHIPPINGAMT 8 00 Set MAXAMT to the expected maximum total amount of the complete order
99. rchant Review Confirmation Smart PayPal Address Payee VISA The safer caster way to pay Shopping Cart Payment Methods Purchase Note that if your checkout flow omits the Merchant Review page and proceeds directly to your Confirmation page you can change the text on the PayPal Review page from Continue to Pay Now For details on how to change the text on the PayPal Review page from Continue to Pay Now see User Confirms Order on PayPal on page 67 Complete Express Checkout Flow To implement Express Checkout you must offer it both as a checkout option and as a payment method You add Express Checkout to your existing flow by placing the Check out with PayPal button on your checkout page and by providing the PayPal mark on your billing payment methods page The following diagram shows the complete flow Complete Express Checkout flow i i gt gt mmm e PayPal Login PayPal Review shipping address checkout p i gt Checkout gt gt gt Confirmation Add To Cart _ gt Collect Shipping Merchant Review Confirmation Smart PayPal Address payee VISA The aster caster way to pay Shopping Cart Payment Methods Create To implement the complete Express Checkout flow Express Checkout Integration Guide October 2009 13 Introducing Express Checkout Express Checkout Building Blocks e On your Shopping Cart page place the Check out with PayPal button and handle button cl
100. rect the customer to back to PayPal The GetExpressCheckoutDetails response contains the REDIRECTREQUIRED field which lets you know if you need to redirect the user after your Order Review page You can use this value to inform the customer on your Order Review page that they will be sent to the giropay website to complete the order Express Checkout Integration Guide October 2009 109 j Integrating giropay with Express Checkout giropay Integration Complete the Transaction Corresponding to the three fields passed to SetExpressCheckout you must add the following three additional pages to your website Additional pages required for giropay integration NVP Field Description Order Completion The GIROPAYSUCCESSURL page that PayPal redirects the customer to after a successful giropay payment Order Cancellation The GIROPAYCANCELURL page that PayPal redirects the customer to after a giropay or bank transfer payment is cancelled or fails Order Pending The BANKTXNPENDINGURL page that PayPal redirects the customer to after a bank transfer payment Receive Transaction Status Notification After PayPal redirects the customer to giropay you receive transaction status information in the following ways e IPN Notification e Email only for successful giropay or bank transfer transactions e PayPal Account Overview e PayPal reports 110 October 2009 Express Checkout Integration Guide
101. rs amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp CURRENCYCODE USD amp PAYMENTACTION Sale amp SNOSHIPPING 1 amp SHIPTOSTREET 1 Main St SHIPTOCITY San Jose I I I I amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 408 967 4444 Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P The figure below shows the PayPal review page when NOSHIPPING is set to 1 62 October 2009 Express Checkout Integration Guide Customizing Express Checkout aa Handling Shipping Addresses PayPal review page with shipping address suppressed WebsiteName com Review Your Information Please review the information below If correct click Continue to complete your payment on the WebsiteName com website Learn more about PayPal policies and your payment source rights and remedies Payment Method Contact Information Credit Card Visa XXXX XXXX XXXX 0084 Chanas jsmithO01 example com Cancel and return to Websiteltame com Shipping Address Override PayPal Seose Payments You can override the buyer s shipping address stored on PayPal You would want to do this if for example your website registration already requested the customer shipping address Overriding the shipping address stored on PayPal replaces it with one you specif
102. s agreed to the recurring payments billing agreement on your confirmation page you must call CreateRecurringPaymentsProfile to create the profile If you are creating multiple recurring payments profiles you must call CreateRecurringPayment sProfile once for each profile to be created If the transaction includes a mixture of a one time purchase and recurring payments profiles call DoExpressCheckoutPayment to complete the one time purchase transaction and then call CreateRecurringPayment sProfile for each recurring payment profile to be created IMPORTANT The recurring payments profile is not created until you receive a success response from the CreateRecurringPaymentsProfile call The CreateRecurringPayment sProfile response contains a Profile ID which is an encoded string that uniquely identifies the recurring payments profile Options for Creating a Recurring Payments Profile You can create a recurring payments profile that allows a regular payment period an optional trial period an initial payment and other options Specifying the Regular Payment Period Each recurring payments profile has a regular payment period that defines the amount and frequency of the payment The following table lists the required fields for specifying the regular payment period Express Checkout Integration Guide October 2009 95 Handling Required fields for specifying a regular payment period Recurring Payments Options for Creating a
103. s and DoExpressCheckoutPayment Changes When you implement the callback you need to call GetExpressCheckoutDetails and DoExpressCheckoutPayment GetExpressCheckoutDetails and DoExpressCheckoutPayment include new parameter fields in support of the Instant Update API You must call the GetExpressCheckoutDetails API operation to obtain the buyer s final shipping option selections GetExpressCheckoutDetails has been updated to return the buyer s selections Because the cart information passed in the call to SetExpressCheckout is only relevant for display on the PayPal Review page you must call the DoExpressCheckoutPayment API operation with the updated shipping insurance and tax data to ensure the buyer sees it upon redirect to your website Other Considerations When you implement the callback there are other issues you must take into consideration These include e Callback response errors e Maximum shipping options e Callback times out Callback Response Errors If there are any callback response errors PayPal responds by displaying the flat rate shipping options on the PayPal Review page To obtain the richer set of options available through the callback exercise care in the syntax and values you specify and test the callback integration Maximum Shipping Options You can specify up to a maximum of 10 shipping options for the flat rate options in the call to SetExpressCheckout and for the detailed options b
104. s as part of the SetExpressCheckout request These URLs tell PayPal where to redirect the customer based on the success or failure of each type of payment transaction See the PayPal Name Value Pair Developer Guide and Reference for more information SetExpressCheckout request fields for giropay NVP Field Description GIROPAYSUCCESSURL The URL on the merchant site to redirect to after a successful giropay payment GIROPAYCANCELURL The URL on the merchant site to redirect to after a giropay or bank transfer payment is cancelled or fails BANKTXNPENDINGURL The URL on the merchant site to transfer to after a bank transfer payment Redirect the Customer to PayPal After selecting a funding source on PayPal the customer is redirected back to your website as in the regular Express Checkout flow There is one additional field REDIRECTREQUIRED returned in the response from both GetExpressCheckoutDetails and DoExpressCheckoutPayment If the value of this field is true you redirect the customer from your Order Review page to https www paypal com webscr cmd _complet xpress checkout amp t oken lt token gt PayPal then redirects the customer from this redirect page to the necessary page for the selected funding source GetExpressCheckoutDetails and DoExpressCheckoutPayment response field NVP Field Description REDIRECTREQUIRED Flag to indicate whether you need to redi
105. saction completed successfully October 2009 Express Checkout Integration Guide Testing an Express Checkout Integration You can test your Express Checkout integration in the Sandbox This example shows how to simulate your web pages using HTTP forms and supplying the values for API operations from these forms You can use this strategy for your initial testing however for more complete testing you will want to replace these forms with your web pages containing actual code The following diagram shows the Express Checkout execution flow which uses the Sandbox as the API server The pages on the left represent your site Express Checkout Integration Guide October 2009 39 a Testing an Express Checkout Integration Express Checkout Execution Flow Legend gt Web Flow API Call Token i Request _ __ b ep Pal gt SetExpressCheckout PayPal 2 Sandbox ER Token S PayPal Login L HTTP Redirect mmm 2 amp 4 HTTP Redirect Confirm Detaits ReturnURL Token Sa Continue 5 Request Token GetExpressCheckoutDetails Sandbox Response Customer Details PayPal Sandbox Ooy C a 6 Request Final Transaction Details Thank DoExpressCheckoutPayment PayPal You Sandbox 7 t Response Transaction Results Success Failure The following steps match the circled numbers in the diagram Perform the actions in each st
106. ss Checkout PayPal Review Page Order Details Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL http amp CANCELURL http amp PAYMENTACTION Sale amp NAME J Smith amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp L_NAMEO 10 Decaf Kona Blend Coffee amp L_NUMBERO 623083 amp L_DESCO Size 8 8 oz amp L_AMT0 9 95 amp L_QTY0 2 amp L_NAME1 Coffee Filter bags amp L_NUMBER1 623084 amp L_DESC1 Size Two 24 piece boxes amp L_AMT1 39 70 amp L_QTY1 2 amp ITEMAMT 99 30 amp TAXAMT 2 58 amp SHIPPINGAMT 3 00 amp HANDLINGAMT 2 99 amp SHIPDISCAMT 3 00 amp INSURANCEAMT 1 00 amp AMT 105 87 amp CURRENCYCODE USD amp ALLOWNOTE 1 w m Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P You can provide values for any subset of the Express Checkout parameters shown in SetExpressCheckout Order Details Parameters in the call to SetExpressCheckout If you pass the generic order description parameter D1 ESC and any one line item parameter listed below both parameter values display on the Review page If you pass the generic order description parameter DESC along with any two of the following line item parameters the order description value does not display e L NAMEn
107. such as gif jpg or png 2 Store the URL to the image on a secure https server so your buyer s web browser does not display a message that the payment contains insecure items 3 Assign the URL to the HDRIMG parameter in the call to SetExpressCheckout The following example sets HDRIMG to a custom header image Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https amp AMT 10 00 amp MAXAMT amp PAYMENTACTION Sale S amp HDRIMG https www mayadeviimports com ebay websitename logo gif amp SHIPTOSTREET 1 Main St amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 408 967 4444 Response Parameters successResponseFields amp TOKEN EC 17C76533PL706494P The figure below shows the review page with a custom header image set in the SetExpressCheckout request 56 October 2009 Express Checkout Integration Guide Customizing Express Checkout PayPal Page Style Review page with custom header image WebsiteName com Review Your Information PayPal secure Payments Please review the information below If correct click Continue to complete your payment on the WebsiteName com website Learn more sbout PayPal policies and your payment source rights and remedies Payment Method Credit Card V
108. the SetExpressCheckout API operation PayPal responds with a message such as the one shown below Note the status which should include ACK set to Success and a token that is used in subsequent steps TIMESTAMP 2007 2d04 2d05T23 3a23 3a07Z amp CORRELATIONID 63cdac0b67b50 amp ACK Success amp VERS ION 52 2e000000 amp BUILD 1 2e0006 amp TOKEN EC 2d1NK66318YB717835M 3 If the operation was successful use the token and redirect your browser to the Sandbox to log in as follows https www sandbox paypal com cgi bin webscr cmd _express checkout amp token EC 1NK66318YB717835M NOTE The token in the command line is an HTTP request parameter and not the NVP field this parameter name must be lowercase You may need to replace hexadecimal codes with ASCII codes for example you may need to replace 2d in the token with a hyphen You must log in to https developer paypal com before you log in to a Sandbox test account You then log in to the test account that represents the buyer not the API_username business test account that represents you as the merchant 4 After logging into the buyer test account confirm the details When you confirm the Sandbox redirects your browser to the return URL you specified when invoking the SetExpressCheckout API operation as in the following example Express Checkout Integration Guide October 2009 41 a Testing an Express Checkout Integration http w
109. the URL to your web service for the callback PayPal validates the URL as described above 3 Provide values for the flat rate shipping options For each option specify Option name L_SHIPP INGOPT IONNAMEn Option label L_SHIPPINGOPTIONLABELn Option amount L_SHIPPINGOPTIONAMOUNTn The shipping option to appear in the drop down menu as the default t rue L_SHIPPINGOPTIONISDEFAULTN NOTE Set L_SHIPPINGOPTIONISDEFAULTn to true default for one and only one shipping option Set L_SHIPPINGOPTIONISDEFAULTn to false for each of the remaining options If required an adjusted value for TAXAMT If required an adjusted value INSURANCEAMT 4 If necessary to adjust the callback timeout default 3 seconds provide a value from 1 to 6 for the CALLBACKT IMEOUT parameter 5 Optionally provide values for any of the shipping option description details fields listed below Option weight L_ITEMWEIGHTVALUEn L_ITEMWEITHTUNITn Option height L_ITEMHEIGHTVALUEn L_ITEMHEIGHTUNITn October 2009 Express Checkout Integration Guide Implementing the Instant Update API Setting Up the Callback Option length L_ITEMLENGTHVALUEn L_ITEMLENGTHUNI Tn Option width L_ITEMWIDTHVALUEn L_ITEMWIDTHUNITn GetExpressCheckoutDetail
110. to send the buyer error messages appropriate to the situations generating the errors Say for example you determine that the buyer has a mixed Express Checkout Integration Guide October 2009 83 Te Immediate Payment Integrating Immediate Payment into the Express Checkout Flow cart of eBay and non eBay items To allow the buyer to check out just the non Immediate Payment items you must provide an appropriate message to the buyer remove the Immediate Payment item and retry the transaction The Call to DoExpressCheckoutPayment To integrate Immediate Payment into the DoExpressCheckoutPayment call 1 Set ALLOWEDPAYMENTMETHODTYPE to InstantPaymentOnly This blocks all pending funding sources and transactions that end up in a pending state 2 Pass the L_EBAYITEMCARTIDn 3 Be prepared to handle Immediate Payment errors For errors you choose to handle you need to send the buyer error messages appropriate to the situations generating the errors Say for example you determine that the buyer has a mixed cart of eBay and non eBay items To allow the buyer to check out just the non Immediate Payment items you must provide an appropriate message to the buyer remove the Immediate Payment item and retry the transaction If payment is successful the DoExpressCheckoutPayment response returns the eBay transaction ID EBAYITEMAUCTIONTXNID 84 October 2009 Express Checkout Integration Gui
111. up the image URL for dynamic use you associate it with your PayPal merchant account number or pal You can obtain your pal by getting it from the Profile page contacting PayPal or calling the GetPalDetails API This is an example call to GetPalDet ails request Request Parameters requiredSecurityParameters amp METHOD GetPalDetails Response Parameters This GetPalDetails response returns the value of PAL and your country code LOCALE as shown below successResponseFields amp PAL SFUCXFDLNFR5U amp LOCALE en_US 1 Append the pal parameter to the image URL and set the parameter to the value of your encrypted PayPal merchant account number https fpdbs paypal com dynamicimageweb cmd _dynamic image pal SFJCXFDLNFR5U 2 You can optionally change the value of LOCALE See Change the Locale for details 3 Place the URL with parameter information at the appropriate image locations in your web application The pal alerts PayPal to campaigns in which you are participating PayPal obtains this information from your account and replaces the default image with the appropriate campaign image during that campaign NOTE If you pass in a pal value matching a merchant account that is not yours PayPal displays the image for that account Be sure to pass the pal value matching your account Express Checkout Integration Guide October 2009 19 Express Checkout Button and Logo Image Integration Dynamic Image
112. up web pages on your site that initiate actions on a PayPal API server by sending a request to the server The PayPal server responds with a confirmation that the requested action was taken or that an error occurred The response may contain additional information related to the request The following diagram shows the basic request response mechanism Your Site Request C ED PayPal J API Server For example you might want to obtain the customer s shipping address from PayPal You could initiate a request that specifies an API operation that gets customer details The response from the PayPal API server would contain information about whether the request was successful If the operation was successful the response would contain the requested information in this case the customer s shipping address If the operation fails there will be one or more error messages PayPal Name Value Pair API Requests and Responses To perform a PayPal NVP API operation you send an NVP formatted request to a PayPal NVP server and interpret the response In the following diagram a request is generated on your site At the PayPal server the request is executed and the response is returned to your site Express Checkout Integration Guide October 2009 25 4 PayPal Name Value Pair API Basics PayPal API Client Server Architecture NVP Request API operation API credentials er _Request specific fields I NVP Response Acknowledge
113. ure a consistent and good buyer experience Localize Shipping Options Return the localized shipping option labels based on the buyer s country and locale that PayPal sends in the callback request Express Checkout Integration Guide October 2009 73 74 Implementing the Instant Update API Setting Up the Callback Setting Up the Callback To set up the callback you establish a connection with PayPal by providing the location where PayPal can call your web service along with your shipping options To start you must build and operate a secure reliable and fast web service that computes the shipping options based on the business rules To verify that the callback request is indeed originating from PayPal you can check to see if the request originates from paypal com as described in the go live checklist at this location In the sandbox environment you can use both HTTP and HTTPS PayPal will validate the following information about the callback e The callback URL must start with HTTPS for production integration e The callback URL must start with HTTP or HTTPS for sandbox integration In the call to SetExpressCheckout you must complete the steps 1 through 3 below Steps 4 and 5 are optional 1 Provide line item details for the merchandise the buyer selected For details on how to integrate line item details see Chapter 7 Customizing Express Checkout in the Express Checkout Integration Guide 2 Provide
114. website To bill the outstanding amount e The profile status must be active or suspended NOTE The BillOutstandingAmount API does not reactivate a suspended profile You need to call ManageRecurringProfileStatus to do this October 2009 Express Checkout Integration Guide Handling Recurring Payments aa Recurring Payments Notifications e The profile must have a non zero outstanding balance e The amount of the payment cannot exceed the outstanding amount for the profile e The BillOutstandingAmount call cannot be within 24 hours of a regularly scheduled payment for this profile NOTE If another outstanding balance payment is already queued an API error is returned You will be informed by IPN about the success or failure of the outstanding payment For profiles created using Express Checkout the buyer will receive an email notification of the payment Recurring Payments Notifications Merchants are notified of recurring payments events through IPN and email Merchants are notified of certain events through IPN For recurring payments profiles created using Express Checkout buyers are also notified of specific events by email The following table indicates when IPN and emails are generated Recurring payments instant payment notifications and email Event IPN Buyer Email Profile successfully created Yes Yes Profile creation failed Yes Yes Profile canceled from paypal com interface Yes Yes Profile status cha
115. ww YourReturnURL com token 5 Invoke a form on your site that calls the on the Sandbox E 1NK66318YB717835M amp PayerID 7AKUSARZ7SAT8 GetExpressCheckoutDetails API operation lt form method post action https api 3t sandbox paypal com nvp hidden hidden type hidden lt input lt input lt input name USI nam typ typ nam ER value API_username gt PWD value API_passwora gt SIGNATURI it value API_signature gt lt input lt input type hidden name TOK V Gl nam EJ EN value EC RSION value 52 0 gt 1NK66318YB717835M gt lt input lt form gt type submit name Hi If the operation was successful the Get information about the payer such as the THOD value GetExpressCheckoutDetails gt ExpressCheckoutDetails API returns following information amp ACK Success TIMESTAMP 2007 2qd04 2qd05T23 3a44 3a11Z amp CORRELATIONID 6b174e9bac3b3 amp VERSION 52 2e000000 amp BUILD 1 2e0006 amp TOKEN EC 2d1NK66318YB717835M amp EMATL jsmith0O1 example com amp PAYERID 7AKUSARZ7SAT8 amp PAYERSTATUS verified amp FIRSTNAME amp LASTNAME amp COUNTRYCODE US amp BUSINESS amp SHIPTONAME amp SHIPTOSTREET amp SHIPTOCITY amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOCOUNTRYNAME United 20States amp SHIPTOZI
116. y Now After the buyer returns from the PayPal site you must call DoExpressCheckoutPayment to actually complete the transaction To display Pay Now on the button 1 Get the token from the response to Set ExpressCheckout The response to SetExpressCheckout is the buyer s token For example if the value of RETURNURL passed to SetExpressCheckout is https www websitename com snagECvalues the URL to which PayPal redirects appears as https www websitename com snagI OW8920957N684880R 2 Add the token and the desired useraction value contin to the following URL https www paypal com cgi bin webscr cmd _express ECvalues token EC ue or Commit as name value pairs checkout amp token valueFromSetExpressCheckoutResponse amp useraction commit The figure below shows the PayPal Review page when useraction commit PayPal review page when user commits to purchase on PayPal WebsiteName com Review Your Payment Please review the informaton below If correct click Pay Now to complete your payment Leam more about PayPal policies and your payment source rights and remedies Payment Method re a 4 X 054 Shipping Address 1 Main Street San Jose CA 95131 United St Change Contact Information T 0i e nipis corr Cancel and return to Wabsitekame com October 2009 Totak 10 00 USD PayPal Seure Payments Express Checkout Integration Guide Implementing the Instant Update API The Insta
117. y in the call to SetExpressCheckout The buyer cannot edit the overridden address NOTE If you prefer to override addresses it is recommended that you do not set confirmed addresses as required as described in Confirmed Address To override the shipping address 1 Set the ADDROVERRI DE parameter to 1 in the call to SetExpressCheckout 2 Set the following shipping address parameters in the call to SetExpressCheckout to the address values you want to use for the new address SH SH SH IPTONAME IPTOSTREET PTOC TY SHIPTOSTATE Optional SHIPTOCOUNTRYCODE SH SH PTOZ Express Checkout Integration Guide P IPTOSTREET2 Optional October 2009 63 o 6 Customizing Express Checkout Handling Shipping Addresses The following example overrides the shipping address with the address values shown Request Parameters requiredSecurityParameters amp METHOD SetExpressCheckout amp RETURNURL https amp CANCELURL https AMT 10 00 amp CURRENCYCODE USD amp PAYMENTACTION Sale amp ADDROVERRIDE 1 amp SHIPTOSTREET 1 Second St amp SHIPTOSTREET2 Ste 210 amp SHIPTOCITY San Jose amp SHIPTOSTATE CA amp SHIPTOCOUNTRYCODE US amp SHIPTOZIP 95131 amp SHIPTOPHONENUM 408 967 4444 Response Parameters successResponseFields amp TOKEN EC 57K68322WE343022B The figure below shows the PayPal Review page when the s
118. yPal 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 you and your 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 1 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 Regardless of the specified currency the format must have 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 AMT amount CURRENCY CODE currencyID 2 Specify the return URL The return URL is the page to which PayPal redirects your buyer s browser after the buyer logs into PayPal and approves the payment Typically this is a secure page https on your site Express Checkout Integration Guide October 2009 35 36 Implementing the Simplest Express Checkout Integration Setting Up the Express Checkout Transaction NOTE You ca
Download Pdf Manuals
Related Search
Related Contents
FICHE PRODUIT MODE D`EMPLOI AVANTAGES Faria Instruments NMEA2000 User's Manual ES-S6A - eTIGER View - the Structural Dynamics Research Lab at the University of kleber vinyl asfaltico Analytical Application Sets - Automation Technology ASUS G750JM User's Manual SOLUTIONS DAIKIN ALTHERMA POUR LE COLLECTIF Manual - Tecnica Industriale S.r.l. Beko CSG 52000 DW cooker Copyright © All rights reserved.
Failed to retrieve file