---
title: "Crear webhook"
method: POST
path: "/switch/v1/webhooks"
tags: ["Webhooks"]
---

# Crear webhook

`POST /switch/v1/webhooks`

## Request

- Base URL: `https://pay.pagaconquickpay.com`
- URL: `https://pay.pagaconquickpay.com/switch/v1/webhooks`
- Auth: API key in header `x-switch-key`

Registra un endpoint `https` y los `eventos` a recibir. Cada entrega se firma con `x-quicklink-signature: sha256=<hex>` (HMAC-SHA256 sobre el **cuerpo crudo**) usando el `secret`. El `secret` se devuelve **una sola vez** en esta respuesta (show-once); guárdalo para verificar firmas.

## Request body

- WebhookCrearRequest
  - `url` string, uri, required: Endpoint `https` que recibe los POST firmados.
  - `eventos` string[], required: Eventos a recibir.

## Response `201`

Webhook creado (incluye `secret` una sola vez)

- WebhookConSecreto
  - `id` string
  - `comercio` string
  - `url` string, uri
  - `eventos` string[]: Eventos a recibir.
  - `estado` 'activo' | 'inactivo'
  - `created_at` string, date-time
  - `secret` string: Secreto HMAC. Se devuelve **una sola vez** (show-once).

## Other responses

- `400`: Validación
- `401`: No autorizado

---

[API](https://skmtc.dev/pagaconquickpay/apis/quickpay-api.md) · [All operations](https://skmtc.dev/pagaconquickpay/apis/quickpay-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pagaconquickpay/apis/quickpay-api/revisions/999597fa67f3?raw)
