---
title: "List Refunds by Payment ID"
source_url: https://docs.rapyd.net/en/list-refunds-by-payment-id.html
lang: en
---

# List Refunds by Payment ID

Retrieve a list of refunds for a specified payment.

### Parameters

### Request Query Parameters

- - payment
  - ID of the payment. String starting with **payment_**.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - amount
  - Amount of the refund, in units defined by `currency` in the original payment.
- - created_at
  - Time of creation of this refund, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - currency
  - The currency of the amount received by the original payment source. Three-letter ISO 4217 code.
- - ewallets
  - Array of objects that define the allocation of the refund to multiple wallets.

    - - ewallet
      - ID of the wallet, a string starting with **ewallet_**.
    - - amount
      - The amount refunded to this wallet. Relevant when `percentage` is not set.
    - - percentage
      - The percentage of this payment refunded to this wallet. Relevant when `amount` is not set.
- - failure_code
  - Indicates the reason that the refund failed. See [Card Network Errors](https://docs.rapyd.net/en/card-network-errors.md "Card Network Errors").
- - failure_reason
  - Indicates the reason that the refund failed. One of the following:

    - **lost_or_stolen_card**
    - **expired_or_canceled_card**
    - **unknown**
    - Empty string
- - fixed_side
  - Indicates which side of the transaction the FX rate is fixed for. Relevant for refunds with foreign exchange. One of the following values:

    - **buy**
    - **sell**
- - fx_rate
  - Exchange rate for the transaction.

    - When `fixed_side` is **buy**, `fx_rate` is the buy rate.
    - When `fixed_side` is **sell**, `fx_rate` is the sell rate.

    Decimal number as string. Relevant to refunds with foreign exchange.
- - id
  - ID of the `refund` object. String starting with **refund_**.
- - merchant_reference_id
  - Identifier defined by the client for reference purposes. Limit: 45 characters.
- - merchant_debited_amount
  - Amount debited from the merchant. Relevant to refunds with foreign exchange.
- - merchant_debited_currency
  - Indicates the currency that is debited from the merchant. Three-letter ISO 4217 code. Relevant to refunds with foreign exchange.
- - merchant_ewallet
  - As a Payment Facilitator (PayFac), you can create a card payment and direct the funds that the sub-merchant collects to your client wallet.

    Relevant to a [PayFac](https://docs.rapyd.net/en/rapyd-payfac-integration-guide.md "Rapyd PayFac Integration Guide").
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - payment
  - ID of the `payment` object that the refund is credited against. String starting with **payment_**.
- - payment_created_at
  - Time that the original payment was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - payment_method_type
  - The original payment method type. Use [List Payment Methods by Country](https://docs.rapyd.net/en/list-payment-methods-by-country.md "List Payment Methods by Country") for a list of supported types for a country.
- - proportional_refund
  - Indicates whether the refund was returned in proportion to the amounts received by the wallets in the payment. Relevant to a refund for a payment split among multiple wallets.
- - reason
  - Description of the reason for the refund, provided by the merchant.
- - receipt_number
  - Number of the receipt for the refund, provided by the merchant.
- - status
  - Indicates the status of the refund operation. One of the following values:

    - **Canceled** - The merchant canceled the refund.
    - **Completed** - The refund was complete.
    - **Error** - The refund failed since the payment object on which the refund is based is not in **closed** status.
    - **Rejected** - The refund was rejected by the specific payment processor for this payment.
    - **Pending** - The request created a refund object on the Rapyd platform, but the refund is not yet complete. For example, the refund is for a payment method that requires a customer action, such as cash, bank redirect or bank transfer.
- - updated_at
  - Time that this refund was last updated, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").

### Code Samples

- - .NET

    - ```csharp
      using System;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string payment = "payment_fdbae3bd097c9fffd88d7c3084f02ffe";

                      string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/refunds?payment={payment}");

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const result = await makeRequest(
            'GET',
            '/v1/refunds?payment=payment_93186bb9a6d7ddfbae1d80f60285d736'
          );

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php

      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      try {
          $object = make_request('get', '/v1/refunds?payment=payment_c26f7c14a6bafdbfb7dfc5300d634e8e');
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      payment = "payment_7b3d9a457f108e8078f4a1a3fedf759c"
      response = make_request(method='get',
                              path=f'/v1/refunds?payment={payment}')

      pprint(response)
      ```

- /v1/refunds?:payment

- List Refunds by Payment ID
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/refunds?payment=payment_7a98328c6da659a181c16a594dae5d3d' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "13cf924a-4e2b-4885-8bb0-59103dd7fb9a"
      },
      "data": [
          {
              "id": "refund_1b4c22f67ddc416e7ab7bcede3a18b64",
              "amount": 15,
              "currency": "USD",
              "failure_reason": "",
              "metadata": {
                  "merchant_defined": true
              },
              "reason": "Uncredited discount",
              "status": "Completed",
              "receipt_number": 0,
              "created_at": 1608559262,
              "updated_at": 1719182140,
              "merchant_ewallet": null,
              "merchant_reference_id": "CA1234op",
              "payment_created_at": 1608559072,
              "payment_method_type": "us_visa_card",
              "ewallets": [],
              "proportional_refund": false,
              "merchant_debited_amount": null,
              "merchant_debited_currency": null,
              "fx_rate": null,
              "fixed_side": null
          }
      ]
  }
  ```
