Endpoints

GET /webhooks/{id}

Retrieve a single webhook subscription.

GET/api/v1/webhooks/{id}secret key

Fetch one subscription. Useful when you stored the id at creation and want to confirm the current URL/events/active state. The secret is NEVER returned — use rotate-secret to mint a new one if you lost yours.

Request
curl https://sandbox.key2pays.com/api/v1/webhooks/wh_3f6c7b1… \
  -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y"
Response
{
  "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",
  "updatedAt": "2026-05-11T09:14:00.000Z"
}