---
title: "Refund Failed Webhook"
source_url: https://docs.rapyd.net/en/refund-failed-webhook.html
lang: en
---

# Refund Failed Webhook

The **PAYMENT_REFUND_FAILED** webhook is sent when a Rapyd refund fails since the payment object on which the refund is based is not in `closed` status.

### Parameters

### Webhook Header Parameters

- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string.
- - signature
  - Signature calculated for each webhook individually.

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

### Webhook Root Parameters

- - created_at
  - Time that the webhook was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").

    > **Note:**
    >
    > Inside the `data` object, some webhooks have another `created_at` field that refers to a different event.
- - data
  - Contains the actual data of the webhook.

    For details, see below.
- - extended_timestamp
  - Time in milliseconds that the webhook was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - id
  - ID of the webhook. String starting with **wh_**.
- - status
  - Status of the webhook. One of the following:

    - **NEW**
    - **CLO** - Closed.
    - **ERR** - Error.
    - **RET** - Re-sent.

    > **Note:**
    >
    > Inside the `data` object, some webhooks have another `status` field that refers to a different event.
- - trigger_operation_id
  - ID of the operation that triggered the webhook. UUID.
- - type
  - Name of the webhook type.

    > **Note:**
    >
    > The name in the Client Portal is different.

### Webhook Data 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").

- PAYMENT_REFUND_FAILED Webhook
- ```json
  {
    "id": "b79d35e8-44e3-4332-bbb2-bcc44c0c157a",
    "token": "wh_dc29f55dc5578b335f0f8ff688437231",
    "organization_id": "3170a8c6-ceab-4299-98bd-85704******5286",
    "org_pk": 0,
    "type": "PAYMENT_REFUND_FAILED",
    "data": {
      "id": "refund_d5e77fd76481c549874a39b6d70cc859",
      "amount": 73.48,
      "payment": "payment_407f4d19f3860d36144843faca4a013a",
      "currency": "EUR",
      "failure_reason": "",
      "failure_code": "",
      "metadata": {},
      "reason": "",
      "status": "Error",
      "receipt_number": 0,
      "created_at": 0,
      "updated_at": 0,
      "merchant_ewallet": null,
      "merchant_reference_id": null,
      "payment_created_at": null,
      "payment_method_type": "",
      "ewallets": [
        {
          "ewallet": "ewallet_f7d6a6bfade1cabb06f3e264d8f1899b",
          "amount": 81
        },
        {
          "ewallet": "ewallet_744a449df75ff04e248ac86e557430e5",
          "amount": 1
        },
        {
          "ewallet": "ewallet_3fa75821f96ab66f05532891527d59d3",
          "amount": 3
        },
        {
          "ewallet": "ewallet_97b1a21cced134eb751f5efc24424048",
          "amount": 5
        }
      ],
      "proportional_refund": true,
      "merchant_debited_amount": 90,
      "merchant_debited_currency": "USD",
      "fx_rate": 0.81681,
      "fixed_side": "sell"
    },
    "attempts": [],
    "trigger_operation_id": "c4dd2614-2277-4538-9c8c-c3f88ce2d7b2",
    "first_attempt_at": 0,
    "last_attempt_at": 0,
    "status": "",
    "created_at": 0,
    "next_attempt_at": 0,
    "uri": ""
  }
  ```
