QuickPay Cobros API

Debitar al pagador (débito inmediato con OTP)

GitHub OpenAPI

Operations 2

POST /switch/v1/cobrar/token Solicitar OTP al banco del pagador #
POST /switch/v1/cobrar Cobrar (debitar al pagador) #

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-cobros-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-cobros-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: QuickPay · Cobros 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: Cobros
  description: Debitar al pagador (débito inmediato con OTP)
paths:
  /switch/v1/cobrar/token:
    post:
      tags:
      - Cobros
      summary: Solicitar OTP al banco del pagador
      description: Paso previo a un cobro con token. El banco del pagador emite un código (válido ~120s).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: Token solicitado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resultado'
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: postSwitchV1CobrarToken
      x-operation-id-source: derived
  /switch/v1/cobrar:
    post:
      tags:
      - Cobros
      summary: Cobrar (debitar al pagador)
      description: Ejecuta un cobro por débito inmediato. Incluye el `otp` capturado del pagador. Lee el estado en la respuesta (no por el código HTTP).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CobrarRequest'
      responses:
        '200':
          description: Resultado del cobro
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resultado'
        '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: postSwitchV1Cobrar
      x-operation-id-source: derived
components:
  schemas:
    TokenRequest:
      type: object
      properties:
        idempotency_key:
          type: string
          format: uuid
        monto:
          type: object
          properties:
            valor:
              type: number
              exclusiveMinimum: true
              minimum: 0
            moneda:
              type: string
              minLength: 3
              maxLength: 3
              default: VES
          required:
          - valor
          additionalProperties: false
        concepto:
          type: string
          maxLength: 120
        canal:
          type: string
          enum:
          - boton_pago
          - billetera_digital
          - pos
          - merchant
          - vpos
          - whatsapp
          default: boton_pago
        origen_ip:
          type: string
        banco_preferido:
          type: string
        cobrador:
          type: object
          properties:
            tipo:
              type: string
              enum:
              - cuenta
              - telefono
            valor:
              type: string
              minLength: 1
            banco:
              type: string
              pattern: ^\d{4}$
            identificacion:
              type: string
              minLength: 1
            tipo_doc:
              type: string
              enum:
              - V
              - E
              - J
              - P
              - G
            nombre:
              type: string
              minLength: 1
              maxLength: 40
          required:
          - tipo
          - valor
          - banco
          - identificacion
          - nombre
          additionalProperties: false
        pagador:
          type: object
          properties:
            tipo:
              type: string
              enum:
              - cuenta
              - telefono
            valor:
              type: string
              minLength: 1
            banco:
              type: string
              pattern: ^\d{4}$
            identificacion:
              type: string
              minLength: 1
            tipo_doc:
              type: string
              enum:
              - V
              - E
              - J
              - P
              - G
            nombre:
              type: string
              minLength: 1
              maxLength: 40
          required:
          - tipo
          - valor
          - banco
          - identificacion
          - nombre
          additionalProperties: false
        telefono_pagador:
          type: string
          pattern: ^0?4\d{9}$
      required:
      - idempotency_key
      - monto
      - concepto
      - cobrador
      - pagador
      additionalProperties: false
    Resultado:
      type: object
      properties:
        id:
          type: string
        estado:
          type: string
          enum:
          - ACEPTADA
          - PENDIENTE
          - LIQUIDADA
          - RECHAZADA
          - ERROR
          - DESCONOCIDA
          - ANULADA
        referencia_banco:
          type: string
          nullable: true
        endtoend:
          type: string
          nullable: true
          default: null
        motivo_rechazo:
          type: string
          enum:
          - SALDO_INSUFICIENTE
          - OTP_INVALIDO
          - CUENTA_NO_EXISTE
          - CUENTA_BLOQUEADA
          - CUENTA_NO_DEBITO
          - CUENTA_NO_CREDITO
          - MONTO_INVALIDO
          - EXCEDE_LIMITE
          - BENEFICIARIO_NO_COINCIDE
          - NO_AFILIADO_SERVICIO
          - BANCO_NO_DISPONIBLE
          - DUPLICADA
          - FUERA_DE_HORARIO
          - CANCELADA_POR_PAGADOR
          - PENDIENTE_BCV
          - RECHAZO_TECNICO
          - FIRMA_AUTH
          - NO_SOPORTADO
          - BLOQUEO_RIESGO
          - NETO_NEGATIVO
          - KYC_INSUFICIENTE
          - COMERCIO_NO_ACTIVO
          - SIN_CUENTA_LIQUIDACION
          - ANULACION_RECHAZADA
          - SIN_DEBITO_EN_EXTRACTO
          - DESCONOCIDO
          nullable: true
          default: null
        intentos:
          type: integer
          minimum: 0
          default: 1
        simulado:
          type: boolean
      required:
      - id
      - estado
      - referencia_banco
      additionalProperties: false
    CobrarRequest:
      type: object
      properties:
        idempotency_key:
          type: string
          format: uuid
        monto:
          type: object
          properties:
            valor:
              type: number
              exclusiveMinimum: true
              minimum: 0
            moneda:
              type: string
              minLength: 3
              maxLength: 3
              default: VES
          required:
          - valor
          additionalProperties: false
        concepto:
          type: string
          maxLength: 120
        canal:
          type: string
          enum:
          - boton_pago
          - billetera_digital
          - pos
          - merchant
          - vpos
          - whatsapp
          default: boton_pago
        origen_ip:
          type: string
        banco_preferido:
          type: string
        cobrador:
          type: object
          properties:
            tipo:
              type: string
              enum:
              - cuenta
              - telefono
            valor:
              type: string
              minLength: 1
            banco:
              type: string
              pattern: ^\d{4}$
            identificacion:
              type: string
              minLength: 1
            tipo_doc:
              type: string
              enum:
              - V
              - E
              - J
              - P
              - G
            nombre:
              type: string
              minLength: 1
              maxLength: 40
          required:
          - tipo
          - valor
          - banco
          - identificacion
          - nombre
          additionalProperties: false
        pagador:
          type: object
          properties:
            tipo:
              type: string
              enum:
              - cuenta
              - telefono
            valor:
              type: string
              minLength: 1
            banco:
              type: string
              pattern: ^\d{4}$
            identificacion:
              type: string
              minLength: 1
            tipo_doc:
              type: string
              enum:
              - V
              - E
              - J
              - P
              - G
            nombre:
              type: string
              minLength: 1
              maxLength: 40
          required:
          - tipo
          - valor
          - banco
          - identificacion
          - nombre
          additionalProperties: false
        otp:
          type: string
        telefono_pagador:
          type: string
          pattern: ^0?4\d{9}$
      required:
      - idempotency_key
      - monto
      - concepto
      - cobrador
      - pagador
      additionalProperties: false
  securitySchemes:
    switchKey:
      type: apiKey
      in: header
      name: x-switch-key
      description: Formato `<comercio>:<api_key>` (sk_test_… o sk_live_…)