Express Checkout with Payflow Gateway - Other transactions

In addition to the basic sale transaction, you can use Express Checkout with the Payflow Gateway to perform additional transaction types, such as, authorization and capture, voids and refunds.

Integration steps

After you have completed the integration steps in the basic Express Checkout for Payflow integration, you can also perform the following transaction types.

  1. Authorize and capture a payment
  2. Void a transaction
  3. Refund a transaction

Authorization and Capture

Authorization and capture is used for payment when merchants have delayed shipments and do not wish to capture the funds right away. With an authorization payment action (ACTION=A), the payment takes place in two steps. First the funds are only authorized from the buyer's PayPal account when the buyer places an order on your website. Then when you are ready to ship the items, you make another API call to capture the funds or can manually capture the payment using your paypal.com account interface. For an in-depth explanation, see the blog post What are the differences between the Express Checkout payment actions?

How Authorization and Capture works

  • An authorization is used to hold funds.
  • The authorization period is 29 days. You have 29 days to capture the payment. The funds are guaranteed for the first 3 days. These 3 days are known as the honor period.
  • Within an authorization period of 29 days, you can perform a re-authorization. A re-authorization within the authorization period grants you another honor period. If you reauthorize the funds on the 27th day of the authorization, the honor period is only 2 days.
  • You may capture less than the original authorization amount, or the full authorization amount, or more than the authorization amount. If capturing more than the original authorization amount, you may capture up to 115% of the original authorization amount or $75 USD more, whichever is less.
  • You can also partially capture the funds during a single authorization period. However, PayPal must approve then authorize this feature for your account.

Code changes

Below are the required authorization transaction changes to a basic Express Checkout sale integration.

  • Change the transaction type in the SetExpressCheckout and DoExpressCheckoutPayment calls to TRXTYPE=A.
  • The response of a successful DoExpressCheckoutPayment API call, contains the authorization PNREF. This is the original transaction ID used in the subsequent capture API call.

Capture an authorization

You can capture (TRXTYPE=D) only authorization transactions.

In the capture request, the original transaction ID (ORIGID) is the PNREF returned in the original authorization transaction response.

Request

USER=username
VENDOR=vendor
PARTNER=PayPal
PWD=password 
TRXTYPE=D  
TENDER=C  
ORIGID=B11P8B97F0D1  
AMT=1.00  
CAPTURECOMPLETE=N 

Response

RESULT=0 
PNREF=B71P7FE018FA 
RESPMSG=Approved 
PPREF=04780526307538250 
CORRELATIONID=7bf681f3299df 
FEEAMT=0.33 
PAYMENTTYPE=instant 
PENDINGREASON=completed 

Void transactions

You can void (TRXTYPE=V) authorizations which have not been captured yet. If the authorization has already been captured, then you can only refund the transaction and voiding it is not an option.

In the void transaction request, the original transaction ID (ORIGID) is the PNREF returned in the original authorization transaction response.

Request

USER=username
VENDOR=vendor
PARTNER=PayPal
PWD=password
TRXTYPE=V 
TENDER=C 
ORIGID=VPNE12564395 

Response

RESULT= 0 
PNREF= B70P4EBC54B7 
RESPMSG= Approved 
PPREF= 5GY89824G17878310 
CORRELATIONID=fde19f9e30d73 

Refund transactions

You can only refund (TRXTYPE=C) a captured or settled transaction. You can refund sale or authorization transactions.

In the refund transaction request, the original transaction ID (ORIGID) is the PNREF returned in the response of the original authorization or sale transaction.

Request

USER=username
VENDOR=vendor
PARTNER=PayPal
PWD=password
TRXTYPE=C 
TENDER=C 
AMT=1.00 
ORIGID= B1PP4FFEBD85 
CAPTURECOMPLETE=Y 
VERBOSITY=HIGH 

Response

RESULT= 0 
PNREF= B1PP4FFEBD89 
RESPMSG= Approved 
PPREF= 7DY60282G2735230J 
CORRELATIONID= fde19f9e30d73