QuickPay Webhooks API

Suscripciones a eventos del comercio (entrega firmada HMAC-SHA256). Aislado por tenant: cada comercio gestiona solo los suyos.

GitHub OpenAPI

Operations 6

GET /switch/v1/webhooks Listar webhooks del comercio #
POST /switch/v1/webhooks Crear webhook #
GET /switch/v1/webhooks/{id} Detalle de un webhook #
PATCH /switch/v1/webhooks/{id} Editar un webhook #
DELETE /switch/v1/webhooks/{id} Eliminar un webhook #
GET /switch/v1/webhooks/{id}/deliveries Entregas de un webhook #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagaconquickpay-com:pagaconquickpay-com-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagaconquickpay-com-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: QuickPay · Webhooks API
  version: 0.1.0
  description: 'API de QuickPay: enlaces de pago, cobro por lote, webhooks y, para aliados, la API directa de cobros y pagos.


    ## Autenticación

    Todas las llamadas usan la cabecera `x-switch-key` con el formato `:`.

    Cada comercio tiene llaves de **prueba** (`sk_test_…`, ambiente de ensayo, no mueven dinero real) y de **producción** (`sk_live_…`).


    ## Idempotencia

    Envía siempre un `idempotency_key` (UUID) único por operación. Reintentar con la misma llave nunca duplica el cobro/pago: devuelve el resultado original.


    ## Estados asíncronos

    La liquidación interbancaria es asíncrona. Una operación puede quedar `PENDIENTE` y confirmarse luego como `LIQUIDADA` o `RECHAZADA`. Usa `/consultar` (o configura un webhook) para conocer el estado final. Ante `DESCONOCIDA`, consulta antes de reintegrar — nunca reenvíes la operación original.


    ## Códigos de rechazo

    El campo `motivo_rechazo` está normalizado (mismo conjunto para todos los bancos).


    ## Integración con IA (MCP)

    Además de esta API REST, QuickPay ofrece un **servidor MCP** para que asistentes de IA (por ejemplo Claude) usen QuickPay como herramienta — sin programar una integración.


    - **Endpoint:** `https://mcp.pagaconquickpay.com/mcp` (transporte Streamable HTTP).

    - **Autenticación:** cabecera `x-switch-key` con `:` (las mismas llaves de esta API).

    - **Herramientas disponibles** (seguras, no mueven dinero directamente):

    - `listar_bancos` — bancos desde los que tus clientes pueden pagarte (código y nombre).

    - `consultar_estado` — estado de una transacción por su id.

    - `crear_link_cobro` — genera un link de cobro para que una persona pague.


    Conéctalo desde cualquier cliente compatible con MCP configurando esa URL y tu `x-switch-key`.'
servers:
- url: https://pay.pagaconquickpay.com
  description: Producción
security:
- switchKey: []
tags:
- name: Webhooks
  description: 'Suscripciones a eventos del comercio (entrega firmada HMAC-SHA256). Aislado por tenant: cada comercio gestiona solo los suyos.'
paths:
  /switch/v1/webhooks:
    get:
      tags:
      - Webhooks
      summary: Listar webhooks del comercio
      description: Lista los endpoints de webhook del comercio autenticado (más recientes primero). El secreto NO se devuelve.
      responses:
        '200':
          description: Webhooks del comercio
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: getSwitchV1Webhooks
      x-operation-id-source: derived
    post:
      tags:
      - Webhooks
      summary: Crear webhook
      description: 'Registra un endpoint `https` y los `eventos` a recibir. Cada entrega se firma con `x-quicklink-signature: sha256=` (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.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCrearRequest'
      responses:
        '201':
          description: Webhook creado (incluye `secret` una sola vez)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConSecreto'
        '400':
          description: Validación
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: postSwitchV1Webhooks
      x-operation-id-source: derived
  /switch/v1/webhooks/{id}:
    get:
      tags:
      - Webhooks
      summary: Detalle de un webhook
      description: Devuelve un webhook del comercio (sin secreto). 404 si no le pertenece.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: getSwitchV1WebhooksById
      x-operation-id-source: derived
    patch:
      tags:
      - Webhooks
      summary: Editar un webhook
      description: Actualiza `url`, `eventos` y/o `estado` (`activo`/`inactivo`). 404 si no le pertenece.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEditarRequest'
      responses:
        '200':
          description: Webhook actualizado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: Validación
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: patchSwitchV1WebhooksById
      x-operation-id-source: derived
    delete:
      tags:
      - Webhooks
      summary: Eliminar un webhook
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Eliminado
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  id:
                    type: string
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: deleteSwitchV1WebhooksById
      x-operation-id-source: derived
  /switch/v1/webhooks/{id}/deliveries:
    get:
      tags:
      - Webhooks
      summary: Entregas de un webhook
      description: 'Últimas 50 entregas (observabilidad): estado, reintentos y próximo intento. 404 si no le pertenece. Con una sk_test_ sólo lista las entregas de avisos de prueba (data.mode = test).'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Entregas
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookDelivery'
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: getSwitchV1WebhooksByIdDeliveries
      x-operation-id-source: derived
components:
  schemas:
    WebhookEventos:
      type: array
      minItems: 1
      items:
        type: string
        enum:
        - transaccion.aprobada
        - transaccion.rechazada
        - transaccion.liquidada
        - link.pagado
        - link.acreditado
        - link.devuelto
      description: Eventos a recibir.
    WebhookCrearRequest:
      type: object
      required:
      - url
      - eventos
      properties:
        url:
          type: string
          format: uri
          description: Endpoint `https` que recibe los POST firmados.
        eventos:
          $ref: '#/components/schemas/WebhookEventos'
    WebhookEditarRequest:
      type: object
      minProperties: 1
      properties:
        url:
          type: string
          format: uri
        eventos:
          $ref: '#/components/schemas/WebhookEventos'
        estado:
          type: string
          enum:
          - activo
          - inactivo
      description: Indica al menos uno de `url`, `eventos` o `estado`.
    WebhookConSecreto:
      allOf:
      - $ref: '#/components/schemas/Webhook'
      - type: object
        properties:
          secret:
            type: string
            description: Secreto HMAC. Se devuelve **una sola vez** (show-once).
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
        evento:
          type: string
        txn_id:
          type: string
          nullable: true
        estado:
          type: string
        status:
          type: integer
          nullable: true
          description: Código HTTP de la respuesta de tu endpoint.
        ok:
          type: boolean
        intentos:
          type: integer
        max_intentos:
          type: integer
        next_attempt_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    Webhook:
      type: object
      properties:
        id:
          type: string
        comercio:
          type: string
        url:
          type: string
          format: uri
        eventos:
          $ref: '#/components/schemas/WebhookEventos'
        estado:
          type: string
          enum:
          - activo
          - inactivo
        created_at:
          type: string
          format: date-time
  securitySchemes:
    switchKey:
      type: apiKey
      in: header
      name: x-switch-key
      description: Formato `<comercio>:<api_key>` (sk_test_… o sk_live_…)