Refund payments

Whether accepting credit cards or PayPal payments, you can refund both direct and captured payments:

Refund a completed payment (sale)

If you need to refund a completed payment, referred to as a sale, simply provide the sale id given to you in response to a completed payment along with an empty JSON payload for a full refund.

Tip: For partial refunds, you can instead include an amount object in the JSON payload.

curl -v https://api.sandbox.paypal.com/v1/payments/sale/67D22837NN7279935/refund \
  -H "Content-Type:application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{}'

Important: The sample requests in this guide are examples only and not runnable as-is. You should substitute all call-specific parameters, such as tokens and IDs, with your own.

Response

You'll get back a response that indicates that the refund is complete and provides HATEOAS links for further information on the refund, the parent payment, or the previous sale:

{
  "id":"04700149C07500921",
  "create_time":"2013-03-01T18:39:18Z",
  "update_time":"2013-03-01T18:39:18Z",
  "state":"completed",
  "amount":{
    "total":"7.47",
    "currency":"USD"
  },
  "sale_id":"67D22837NN7279935",
  "parent_payment":"PAY-8DW08487GN7528733KEYPITA",
  "links":[
    {
      "href":"https://api.sandbox.paypal.com/v1/payments/refund/04700149C07500921",
      "rel":"self",
      "method":"GET"
    },
    {
      "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8DW08487GN7528733KEYPITA",
      "rel":"parent_payment",
      "method":"GET"
    },
    {
      "href":"https://api.sandbox.paypal.com/v1/payments/sale/67D22837NN7279935",
      "rel":"sale",
      "method":"GET"
    }
  ]
}

Refund a captured payment

You can also refund a captured payment as you would do a refund on a sale, using this URI instead: https://api.paypal.com/v1/payments/capture/{capture_id}/refund

You'll need to provide an amount object for both full and partial refunds. This example includes an lower amount object for a partial refund:

curl -v https://api.sandbox.paypal.com/v1/payments/capture/8F148933LY9388354/refund \
  -H "Content-Type:application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{
    "amount": {
      "currency": "USD",
      "total": "110.54"
    },
    "description": "This is the capture refund description."
  }'

What's next

scroll to top