# How to refund a payment

It's possible to refund the payment, but you have to take additional actions described below.

# Prerequisites

In order to refund a payment, it has to be captured first.

Additionally, you need a PayPal access token. If you don't have it yet, follow the instructions in the Get PayPal access token document.

# Refund payment

# Get Refund URL

  1. Sign in to the commercetools' merchant center and find order you want to refund.
  2. Go to the Payments tab. Move down to the commercetools Paypal integration payment custom type panel.
  3. Copy the value of the Refund URL field.
commercetools paypal integration panel - refund

# Send a request using Postman

Create a new request in Postman:

  1. Set the method to POST
  2. Set the URL to the Refund URL value from the previous step.
  3. Open the Headers tab add two entries with:
    • key: Content-Type and value application/json,
    • key: Authorization and value: Bearer <TOKEN_FROM_THE_FIRST_STEP>.
  4. Click the Send button.

If you correctly configured the Webhooks, they will add a new transaction to the commercetools:

Refunded payment