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 places a hold on the funds and is valid for 29 days.
  • After a successful authorization, PayPal recommends that you capture the funds within the three-day honor period.

Note You have up to 29 days to capture an authorization, and when you do, the funds are held for three days only.

  • Success of the capture is subject to risk and availability of funds on the authorized funding instrument.
  • Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires. A re-authorization generates a new Authorization ID and restarts the honor period and any subsequent capture should be performed on the new Authorization ID. If you do a re-authorization on the 27th day of the authorization, you get only two days of honor period.
  • You can capture less than the original authorization, full authorization amount, or even more than the authorization amount (up to 115% of the original authorization 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.

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