Integration Guide

Table Of Contents
Digital Goods Integration Guide - EC Edition January 2012 25
Integrating Digital Goods for Express Checkout
Integrating Digital Goods Payments With Express Checkout
2
After the buyer approves the payment or cancels, PayPal redirects back to the return or cancel
URL:
Return URL—If the buyer approves the payment, PayPal redirects to the return URL with
the token you passed in the redirect to PayPal and the buyers unique identifier (Payer ID).
Cancel URL—If the buyer cancels, PayPal redirects to the cancel URL with the token that
you passed in the redirect to PayPal.
After PayPal Redirects the Buyer To Your Web Page
The actions you take after PayPal redirects the buyer back to your web page depend upon
whether the buyer approves or cancels the order.
If the buyer approves the order and pays for the digital goods, do the following:
1. Optionally, call the GetExpressCheckoutDetails API operation to obtain details
about the buyer to display to your webpage.
2. Call DoExpressCheckout to complete payment.
Completing the Digital Goods Transaction
To complete the digital goods transaction after the buyer approves the order, call the
DoExpressCheckoutPayment API operation.
When calling DoExpressCheckoutPayment, do the following:
1. Pass the token and Payer ID returned by PayPal when it redirected the buyer back to your
site.
TOKEN=tokenValue
PAYERID=payerId
2. Pass the total amount of the payment as the value of PAYMENTREQUEST_0_AMT; include
the currency if it is not in US dollars.
Specify the total amount of the transaction. Regardless of the specified currency, the format
must have decimal point. The decimal point must include exactly 2 digits to the right and
an optional thousands separator to the left, which must be a comma.
For example, specify EUR 2.000,00 as 2000.00 or 2,000.00. The specified amount cannot
exceed USD $10,000.00, regardless of the currency used.
PAYMENTREQUEST_0_AMT=amount
PAYMENTREQUEST_0_CURRENCYCODE=currencyID
3. If you passed in a tax amount for each item, set PAYMENTREQUEST_0_TAXAMT to the total
amount of tax.