Events

Every change worth knowing about is recorded as an event and sent to your webhook endpoints.

The event object

idstring
Starts with evt_. Use it to deduplicate webhook deliveries.
objectstring
Always event.
typestring
payment.succeeded, payment.failed, payment.expired, payment.canceled, refund.succeeded, refund.pending, refund.failed, payout.created, payout.paid, payout.canceled.
livemodeboolean
Test or live mode.
created_attimestamp
When it happened.
data.objectobject
The payment, refund or payout as it was at that moment.
payment.succeeded
{
  "id": "evt_2Bc4De6Fg8Hi0Jk2Lm4No6",
  "object": "event",
  "type": "payment.succeeded",
  "livemode": false,
  "created_at": "2026-11-27T10:01:12Z",
  "data": {
    "object": {
      "id": "pay_4Nq7xY2mKc8vTz1aB3dE9f",
      "object": "payment",
      "livemode": false,
      "status": "succeeded",
      "amount": 15200,
      "currency": "MMK",
      "method": "mmqr",
      "reference": "order-1001",
      "bank_reference": "KP7GQ2M9XW4T",
      "description": "Table 4",
      "checkout_url": "https://checkout.klinkpay.net/c/pay_4Nq7xY2mKc8vTz1aB3dE9f",
      "qr_payload": "00020101021226…6304A1B2",
      "redirect_url": null,
      "customer_phone": null,
      "return_url": "https://shop.example.com/orders/1001",
      "metadata": {
        "order_id": "1001"
      },
      "failure_reason": null,
      "expires_at": "2026-11-27T10:15:00Z",
      "succeeded_at": "2026-11-27T10:01:12Z",
      "created_at": "2026-11-27T10:00:00Z",
      "amount_refunded": 0,
      "fees": {
        "provider": 76,
        "klink": 304,
        "total": 380
      },
      "net": 14820,
      "payment_link": null
    }
  }
}

Retrieve an event

GET/v1/events/:id

Returns the event. Requires events:read on restricted keys.

Request
curl https://sandbox-api.klinkpay.net/v1/events/evt_2Bc4De6Fg8Hi0Jk2Lm4No6 \
  -H "Authorization: Bearer kp_test_…"

List events

GET/v1/events

Query

typestring
Only events of this type, e.g. payment.succeeded.
limit, starting_after, ending_before
See Pagination.
Request
curl https://sandbox-api.klinkpay.net/v1/events?type=payment.succeeded&limit=10 \
  -H "Authorization: Bearer kp_test_…"
Response
{
  "object": "list",
  "data": [
    {
      "id": "evt_2Bc4De6Fg8Hi0Jk2Lm4No6",
      "object": "event",
      "type": "payment.succeeded",
      "livemode": false,
      "created_at": "2026-11-27T10:01:12Z",
      "data": {
        "object": {
          "id": "pay_4Nq7xY2mKc8vTz1aB3dE9f",
          "object": "payment",
          "livemode": false,
          "status": "succeeded",
          "amount": 15200,
          "currency": "MMK",
          "method": "mmqr",
          "reference": "order-1001",
          "bank_reference": "KP7GQ2M9XW4T",
          "description": "Table 4",
          "checkout_url": "https://checkout.klinkpay.net/c/pay_4Nq7xY2mKc8vTz1aB3dE9f",
          "qr_payload": "00020101021226…6304A1B2",
          "redirect_url": null,
          "customer_phone": null,
          "return_url": "https://shop.example.com/orders/1001",
          "metadata": {
            "order_id": "1001"
          },
          "failure_reason": null,
          "expires_at": "2026-11-27T10:15:00Z",
          "succeeded_at": "2026-11-27T10:01:12Z",
          "created_at": "2026-11-27T10:00:00Z",
          "amount_refunded": 0,
          "fees": {
            "provider": 76,
            "klink": 304,
            "total": 380
          },
          "net": 14820,
          "payment_link": null
        }
      }
    }
  ],
  "has_more": false
}