Finalize the payment

Important: This integration method is Deprecated as of January 1, 2017. For new integrations, see the PayPal Express Checkout Integration Guide.

The DoExpressCheckoutPayment call authorizes the buyer’s funding source, finalizes sales, and moves the money to your merchant PayPal account.

To authorize a payment and capture the funds at a later time, see Set up Authorization and Capture transactions.

Request

For brevity, this sample request specifies the minimum required parameters. Include these items in the request:

  • Final line item details, including any changes that may have occurred, such as additional shipping costs or taxes based on the address provided by PayPal in the GetExpressCheckoutDetails call.

  • TOKEN

  • PayerID

USER=xxxxxxxx
PWD=xxxxxxxx
SIGNATURE=xxxxx
METHOD=DoExpressCheckoutPayment
VERSION=124.0
TOKEN=EC-72D0681527109671C
PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYERID=3T5GGNEZ8T33S
PAYMENTREQUEST_0_AMT=524.20
PAYMENTREQUEST_0_ITEMAMT=458.00
PAYMENTREQUEST_0_SHIPPINGAMT=20.00
PAYMENTREQUEST_0_TAXAMT=46.20
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_DESC=test EC payment
L_PAYMENTREQUEST_0_NAME0=Books
L_PAYMENTREQUEST_0_AMT0=154.00
L_PAYMENTREQUEST_0_NUMBER0=ABC123
L_PAYMENTREQUEST_0_QTY0=2
L_PAYMENTREQUEST_0_NAME1=CDs
L_PAYMENTREQUEST_0_AMT1=50.00
L_PAYMENTREQUEST_0_NUMBER1=BY-Z4736
L_PAYMENTREQUEST_0_QTY1=3

For detailed reference information, see DoExpressCheckoutPayment API Operation (NVP).

Response

TOKEN=EC-72D0681527109671C
SUCCESSPAGEREDIRECTREQUESTED=false
TIMESTAMP=2015-10-22T01:15:12Z
CORRELATIONID=3eb58b1d509ea
ACK=Success
VERSION=124.0
BUILD=18308778
INSURANCEOPTIONSELECTED=false
SHIPPINGOPTIONISDEFAULT=false
PAYMENTINFO_0_TRANSACTIONID=92N24777UP8461437
PAYMENTINFO_0_TRANSACTIONTYPE=cart
PAYMENTINFO_0_PAYMENTTYPE=instant
PAYMENTINFO_0_ORDERTIME=2015-10-22T01:15:11Z
PAYMENTINFO_0_AMT=524.20
PAYMENTINFO_0_FEEAMT=15.50
PAYMENTINFO_0_TAXAMT=46.20
PAYMENTINFO_0_CURRENCYCODE=USD
PAYMENTINFO_0_PAYMENTSTATUS=Completed
PAYMENTINFO_0_PENDINGREASON=None
PAYMENTINFO_0_REASONCODE=None
PAYMENTINFO_0_PROTECTIONELIGIBILITY=Eligible
PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE=ItemNotReceivedEligible,UnauthorizedPaymentEligible
PAYMENTINFO_0_SECUREMERCHANTACCOUNTID=6CFEBJAE59DAY
PAYMENTINFO_0_ERRORCODE=0
PAYMENTINFO_0_ACK=Success

The transaction is now complete and the transaction activity appears in your PayPal account. You can now display a “Receipt” or a “Thank You” page to the buyer.

Recover from a 10486 redirect error

If the buyer selects a funding source with inadequate funds, the final DoExpressCheckoutPayment call returns a 10486 error code. If this occurs, redirect the buyer back to PayPal. See How to recover from funding failure error code 10486.

If this error occurs in the In-Context Checkout flow, display a button that allows the buyer to choose a different funding source. Then open the In-Context window through a click event. Otherwise issue a full page redirect.

Additional information

Next

You can optionally authorize and capture a payment or you can test your integration.