Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mesadepagos.com/llms.txt

Use this file to discover all available pages before exploring further.

Los webhooks permiten recibir notificaciones cuando una transaccion cambia de estado.

Crear Webhook

POST /v2/webhooks
{
  "url": "https://partner.example.com/webhooks/yp",
  "description": "Webhook principal",
  "apiKey": "partner-secret",
  "status": "ACTIVE",
  "events": {
    "transaction": ["completed_transaction", "failed_transaction"]
  }
}

Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://partner.example.com/webhooks/yp",
  "apiKey": "partner-secret",
  "description": "Webhook principal",
  "events": ["completed_transaction", "failed_transaction"]
}

Listar Webhooks

GET /v2/webhooks

Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "callbalckUrl": "https://partner.example.com/webhooks/yp",
    "events": {
      "transaction": ["completed_transaction", "failed_transaction"]
    },
    "createdAt": "2026-05-12T12:00:00.000Z",
    "updatedAt": "2026-05-12T12:00:00.000Z",
    "description": "Webhook principal",
    "status": "ACTIVE"
  }
]

Obtener Webhook

GET /v2/webhooks/{id}

Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "callbalckUrl": "https://partner.example.com/webhooks/yp",
  "events": {
    "transaction": ["completed_transaction", "failed_transaction"]
  },
  "createdAt": "2026-05-12T12:00:00.000Z",
  "updatedAt": "2026-05-12T12:00:00.000Z",
  "description": "Webhook principal",
  "status": "ACTIVE"
}

Actualizar Webhook

PATCH /v2/webhooks/{id}
{
  "url": "https://partner.example.com/webhooks/yp-v2",
  "description": "Webhook actualizado",
  "apiKey": "partner-secret",
  "status": "ACTIVE",
  "events": {
    "transaction": [
      "completed_transaction",
      "failed_transaction",
      "expired_transaction"
    ]
  }
}

Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://partner.example.com/webhooks/yp-v2",
  "apiKey": "partner-secret",
  "description": "Webhook actualizado",
  "events": [
    "completed_transaction",
    "failed_transaction",
    "expired_transaction"
  ]
}

Logs

GET /v2/webhooks/logs

Query Params

ParametroRequeridoValores
pageNoNumero de pagina
limitNoMaximo 100
statusNoSUCCESS, ERROR
webhookIdNoUUID del webhook

Response

{
  "logs": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440010",
      "webhookId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Webhook principal",
      "webhookUrl": "https://partner.example.com/webhooks/yp",
      "status": "SUCCESS",
      "payload": {
        "event": "completed_transaction"
      },
      "statusCode": 200,
      "duration": 120,
      "retries": 0,
      "createdAt": "2026-05-12T12:00:00.000Z",
      "updatedAt": "2026-05-12T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  }
}

Eventos Soportados

pending_transaction
processing_transaction
completed_transaction
reject_transaction
failed_transaction
expired_transaction