How to Make a Basic Refund Using the Merchant API

Important: This integration method is deprecated as of January 1, 2017. PayPal continues to support existing merchants using this method, but please be advised new features and enhancements will not be applied to these integrations. For new integrations, see the PayPal Checkout Integration Guide.

You can use the RefundTransaction call, which is part of the Merchant API, to make a full or partial refund to a customer.

The default refund period is 180 days from the transaction date.

If you refund a payment for goods or services, there are no fees to make the refund, but the fees you originally paid as the seller are not returned to you. The amount of the refunded payment will be deducted from your PayPal account.

If a transaction occurred after the default refund period of 180 days, you cannot use the RefundTransaction API operation to issue the refund. For more information, see the RefundTransaction (NVP | SOAP) API Operation.

For more about refunds, see All about refunds at PayPal.

Step 1: Process a Payment and Store the Transaction ID

In the RefundTransaction call, you will use a PayPal transaction ID from a payment that has been processed.

The following documents show examples of how to process a payment and obtain a PayPal transaction ID:

Step 2: Refund the Customer

To use a transaction ID in a RefundTransaction call, replace the value of transaction_ID in the example below with a transaction ID from Step 1.

The following example shows how to make a full refund. (To make a partial refund, see the "Issuing Refunds" section of Related API Operations.)

Endpoint URL:
HTTP method: POST
POST data:
&TRANSACTIONID=transaction_ID    #ID of the transaction for which the refund is made
&REFUNDTYPE=Full    #Specifies a full refund; a partial refund requires more input fields

REFUNDTRANSACTIONID=7XH234440V8691234  #New transaction ID, for the refund