> ## Documentation Index
> Fetch the complete documentation index at: https://doc.raliopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Swap Failed

> Webhook event fired when an FX swap is rejected by the provider and the origin hold is reverted

<Info>
  **Event Name:** `swap_failed`
</Info>

When this event fires, the hold on the origin funds has already been released. The payload includes a `failure` object with the rejection reason, and `amounts.creditedAmount` is omitted since no funds were credited.

## Event Payload

The webhook payload contains the following structure:

<CodeGroup>
  ```json Example Payload theme={null}
  {
    "eventId": "d93f5a21-6c48-4e0b-a179-3b82c5d6e014",
    "eventType": "swap_failed",
    "timestamp": "2026-06-22T11:00:07.5241190Z",
    "data": {
      "status": "FAILED",
      "swapType": "fxSwap",
      "orderId": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
      "ownReference": "FX-SWAP-2026-001",
      "source": {
        "type": "account",
        "debitedAccountId": "8befb505-7f8c-4a72-85a5-e7cbc9719ba8",
        "debitedUserId": "15c5277a-8c8c-41d2-9f42-66f82f6f113d"
      },
      "destination": {
        "type": "account",
        "creditedAccountId": "e582cef6-a320-4d0d-afda-446ba16725ac",
        "creditedUserId": "15c5277a-8c8c-41d2-9f42-66f82f6f113d"
      },
      "amounts": {
        "debitedAmount": {
          "amount": 100000,
          "currency": "EUR"
        },
        "fees": {
          "currency": "EUR",
          "total": 1500,
          "breakdown": {
            "systemFee": 1000,
            "merchantFee": 500
          }
        },
        "amountAfterFees": {
          "amount": 98500,
          "currency": "EUR"
        },
        "fx": {
          "pair": "EUR/USD",
          "rate": "1.0823"
        }
      },
      "failure": {
        "code": "FAILED",
        "reason": "provider rejected"
      }
    }
  }
  ```
</CodeGroup>
