Endpoints

GET /webhooks (list)

List the merchant's webhook subscriptions with pagination.

GET/api/v1/webhookssecret key

List the calling merchant's webhook subscriptions. Paginated with the same offset envelope as every other listing. `secret` is NEVER returned here — only on creation and on rotate.

Body parameters
  • limitinteger
    1–100. Default 50.
  • offsetinteger
    Default 0.
Request
curl "https://sandbox.key2pays.com/api/v1/webhooks?limit=20" \
  -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y"
Response
{
  "data": [
    {
      "id": "wh_3f6c7b…",
      "url": "https://acme.com/webhooks/key2pay",
      "events": ["payment.completed", "payment.refunded"],
      "active": true,
      "description": "Production handler",
      "createdAt": "2026-05-10T18:00:00.000Z"
    }
  ],
  "pagination": { "total": 1, "limit": 20, "offset": 0, "pages": 1 }
}