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.

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