Skip to main content
GET
https://api.onepay.la/v1
/
webhooks
Listar webhooks
curl --request GET \
  --url https://api.onepay.la/v1/webhooks \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Notificaciones de Pagos",
      "description": "Webhook para recibir eventos de pagos",
      "url": "https://mi-servidor.com/webhooks/onepay",
      "events": [
        "payment.approved",
        "payment.rejected"
      ],
      "header": "wh_hdr_abc123...",
      "is_test": false,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "name": "Notificaciones de Cargos",
      "description": null,
      "url": "https://mi-servidor.com/webhooks/charges",
      "events": [
        "charge.paid",
        "charge.failed"
      ],
      "header": "wh_hdr_def456...",
      "is_test": false,
      "created_at": "2024-02-01T14:20:00Z",
      "updated_at": "2024-02-05T09:15:00Z"
    }
  ]
}
Obtiene una lista de todos los webhooks configurados en tu cuenta.

Response

data
array
Lista de webhooks configurados

Ejemplos de uso

curl https://api.onepay.la/v1/webhooks \
  -H "Authorization: Bearer sk_test_xxx"

Ejemplo de respuesta

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Notificaciones de Pagos",
      "description": "Webhook para recibir eventos de pagos",
      "url": "https://mi-servidor.com/webhooks/onepay",
      "events": [
        "payment.approved",
        "payment.rejected"
      ],
      "header": "wh_hdr_abc123...",
      "is_test": false,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "name": "Notificaciones de Cargos",
      "description": null,
      "url": "https://mi-servidor.com/webhooks/charges",
      "events": [
        "charge.paid",
        "charge.failed"
      ],
      "header": "wh_hdr_def456...",
      "is_test": false,
      "created_at": "2024-02-01T14:20:00Z",
      "updated_at": "2024-02-05T09:15:00Z"
    }
  ]
}
Los webhooks se devuelven ordenados por fecha de creación, del más reciente al más antiguo.