> ## 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.

# vIBAN Failed

> Webhook event fired when a Virtual IBAN request is rejected by compliance

# vIBAN Failed

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

<Note>
  This event signifies that a `PENDING` vIBAN request was reviewed and **rejected** by compliance. The `reason` field describes why the request was rejected. A new vIBAN must be requested if you want to retry.
</Note>

## Event Payload

The webhook payload contains the following structure:

<CodeGroup>
  ```json Example Payload theme={null}
  {
    "eventId": "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
    "eventType": "viban_failed",
    "timestamp": "2026-05-10T12:34:56.789Z",
    "data": {
      "vibanId": "7a1f3c5b-2d8e-4f0a-9b6c-1e3d4f5a6b7c",
      "accountId": "4c2b8e5d-1f6a-4e7c-9d3b-2a8f5c1e9b4d",
      "rail": "SEPA",
      "status": "REJECTED",
      "reason": "OFAC hit on UBO 2026-05-10"
    }
  }
  ```
</CodeGroup>

### Payload Fields

<ParamField path="eventId" type="string" required>
  Unique identifier for this webhook event
</ParamField>

<ParamField path="eventType" type="string" required>
  Event type — always `viban_failed` for this webhook
</ParamField>

<ParamField path="timestamp" type="string" required>
  ISO 8601 timestamp indicating when the event occurred
</ParamField>

<ParamField path="data" type="object" required>
  Event-specific payload

  <Expandable title="data">
    <ParamField path="vibanId" type="string" required>
      Unique identifier of the vIBAN that was rejected
    </ParamField>

    <ParamField path="accountId" type="string" required>
      Identifier of the account the vIBAN was attached to
    </ParamField>

    <ParamField path="rail" type="string" required>
      Banking rail of the vIBAN — `SEPA` or `ACH`
    </ParamField>

    <ParamField path="status" type="string" required>
      Current vIBAN state — `REJECTED` for this event
    </ParamField>

    <ParamField path="reason" type="string" required>
      Human-readable explanation of why the vIBAN request was rejected
    </ParamField>
  </Expandable>
</ParamField>

## Expected Responses

<CardGroup cols={3}>
  <Card title="Success Response" icon="circle-check" color="#16a34a">
    **HTTP 200 OK**

    The webhook was processed successfully.
  </Card>

  <Card title="Client Error" icon="triangle-exclamation" color="#dc2626">
    **HTTP 4xx Status**

    Client-side error. Will not be retried.
  </Card>

  <Card title="Server Error" icon="circle-xmark" color="#ea580c">
    **HTTP 5xx Status**

    Server-side error. Will be retried with exponential backoff.
  </Card>
</CardGroup>

## Implementation Example

<CodeGroup>
  ```javascript Node.js theme={null}
  app.post('/webhooks/ralio', async (req, res) => {
    const { eventType, data } = req.body;

    if (eventType === 'viban_failed') {
      const { vibanId, accountId, reason } = data;
      console.warn(`vIBAN ${vibanId} rejected on account ${accountId}: ${reason}`);

      // Mark the vIBAN as rejected and surface the reason to your operators
      await markVibanRejected(vibanId, reason);

      return res.status(200).json({ received: true });
    }
  });
  ```

  ```python Python theme={null}
  @app.route('/webhooks/ralio', methods=['POST'])
  def handle_webhook():
      payload = request.get_json()

      if payload['eventType'] == 'viban_failed':
          data = payload['data']
          viban_id = data['vibanId']
          reason = data['reason']

          # Mark the vIBAN as rejected and surface the reason to your operators
          mark_viban_rejected(viban_id, reason)

          return jsonify({'received': True}), 200
  ```

  ```go Go theme={null}
  func handleWebhook(w http.ResponseWriter, r *http.Request) {
      var payload struct {
          EventType string `json:"eventType"`
          Data      struct {
              VibanID   string `json:"vibanId"`
              AccountID string `json:"accountId"`
              Rail      string `json:"rail"`
              Status    string `json:"status"`
              Reason    string `json:"reason"`
          } `json:"data"`
      }

      if err := json.NewDecoder(r.Body).Decode(&payload); err != nil {
          http.Error(w, "Invalid JSON", http.StatusBadRequest)
          return
      }

      if payload.EventType == "viban_failed" {
          log.Printf("vIBAN %s rejected: %s", payload.Data.VibanID, payload.Data.Reason)

          if err := markVibanRejected(payload.Data.VibanID, payload.Data.Reason); err != nil {
              http.Error(w, "Internal error", http.StatusInternalServerError)
              return
          }

          w.Header().Set("Content-Type", "application/json")
          w.WriteHeader(http.StatusOK)
          json.NewEncoder(w).Encode(map[string]bool{"received": true})
      }
  }
  ```
</CodeGroup>
