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

> Webhook event fired when a Virtual IBAN is deactivated and no longer accepts incoming transfers

# vIBAN Deactivated

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

<Note>
  This event signifies that a previously `ACTIVE` Virtual IBAN has been deactivated. The associated `iban` will no longer accept incoming transfers. Any payments sent to it after this event will not be credited.
</Note>

## Event Payload

The webhook payload contains the following structure:

<CodeGroup>
  ```json Example Payload theme={null}
  {
    "eventId": "f1e2d3c4-b5a6-7980-1234-567890abcdef",
    "eventType": "viban_deactivated",
    "timestamp": "2026-05-10T12:34:56.789Z",
    "data": {
      "vibanId": "7a1f3c5b-2d8e-4f0a-9b6c-1e3d4f5a6b7c",
      "accountId": "4c2b8e5d-1f6a-4e7c-9d3b-2a8f5c1e9b4d",
      "rail": "SEPA",
      "status": "INACTIVE",
      "iban": "DE89370400440532013000"
    }
  }
  ```
</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_deactivated` 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 deactivated
    </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 — `INACTIVE` for this event
    </ParamField>

    <ParamField path="iban" type="string" required>
      Account number that was associated with the vIBAN (IBAN for SEPA, account number for ACH). No longer operational
    </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_deactivated') {
      const { vibanId, accountId, iban } = data;
      console.log(`vIBAN ${vibanId} deactivated on account ${accountId}`);

      // Stop offering this IBAN to end users
      await markVibanInactive(vibanId, iban);

      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_deactivated':
          data = payload['data']
          viban_id = data['vibanId']
          iban = data['iban']

          # Stop offering this IBAN to end users
          mark_viban_inactive(viban_id, iban)

          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"`
              IBAN      string `json:"iban"`
          } `json:"data"`
      }

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

      if payload.EventType == "viban_deactivated" {
          log.Printf("vIBAN %s deactivated on account %s", payload.Data.VibanID, payload.Data.AccountID)

          if err := markVibanInactive(payload.Data.VibanID, payload.Data.IBAN); 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>
