Skip to main content
Kyren Pay sends webhook notifications for the following event types.

Event Types

EventDescriptionTrigger
order.paidA payment has been confirmedCustomer completes checkout

Event Object Structure

All webhook events share the same top-level structure:
{
  "id": "evt_abc123",
  "type": "order.paid",
  "created_at": 1736932500000,
  "data": {
    // Event-specific data
  }
}
FieldTypeDescription
idstringUnique event identifier (use for deduplication)
typestringThe event type
created_atintegerUnix timestamp in milliseconds
dataobjectEvent-specific payload

order.paid

Sent when a customer successfully completes a payment.
{
  "id": "evt_abc123",
  "type": "order.paid",
  "created_at": 1736932500000,
  "data": {
    "order_id": "order_def456",
    "product_id": "prod_abc123",
    "customer_email": "customer@example.com",
    "amount": "9.99",
    "currency": "USD",
    "net_amount": "9.29",
    "paid_at": 1736932500000,
    "metadata": { "user_id": "u_123" }
  }
}
FieldTypeDescription
order_idstringThe order ID
product_idstringThe product that was purchased
customer_emailstringCustomer’s email address
amountstringTotal payment amount
currencystringThree-letter currency code
net_amountstringAmount after fees
paid_atintegerWhen the payment was confirmed (Unix timestamp in milliseconds)
metadataobject | nullThe metadata you passed when creating the checkout session
This is the most important event. Use it to fulfill orders — for example, adding credits to a user’s account.

Handling Events

Here’s how to handle webhook events in your endpoint:
app.post('/webhooks/kyren', (req, res) => {
  // ... verify signature first ...

  const event = JSON.parse(req.body.toString());

  switch (event.type) {
    case 'order.paid':
      handleOrderPaid(event.data);
      break;
    default:
      console.log(`Unhandled event: ${event.type}`);
  }

  res.status(200).send('OK');
});