Notifications
Koywe emits notifications to keep merchant users informed about order events — separately from webhooks, which are meant for server-to-server integrations.
There are two independent channels, configured per merchant:
- In-app notifications: delivered to users signed into the Koywe dashboard. Always on.
- Email notifications: opt-in. Off by default; enable and choose recipients per merchant.
Notifications are for humans — ops teams, finance, customer support. For programmatic integration, use Webhooks.
In-App Notifications
In-app notifications are generated automatically for order events only — eventType uses the order.* subset of the webhook taxonomy (e.g., order.completed, order.failed) and does not cover merchant.*, policy.*, webhook.ping, or other families. Each notification is scoped to a single merchant and can be listed, counted, and marked as read through the API that powers the dashboard notification center.
Notification Object
{
"id": "d2dd8481-3552-4466-b99e-a7caad69a302",
"merchantId": "koywe-3-sys",
"orderId": "ord_abc123",
"orderType": "PAYIN",
"eventType": "order.completed",
"title": "Your payment completed",
"body": "Your payment of $500 USD was processed successfully.",
"read": false,
"readAt": null,
"createdAt": "2026-04-13T18:00:00.000Z",
"metadata": null
}| Field | Description |
|---|---|
id | Notification ID |
merchantId | Merchant the notification belongs to |
orderId | Related order, if any |
orderType | PAYIN, PAYOUT, ONRAMP, OFFRAMP, BALANCE_TRANSFER, PAYMENT_LINK |
eventType | Order subset of the webhook taxonomy (order.completed, order.failed, …). Other event families (merchant.*, policy.*, webhook.ping) do not produce in-app notifications |
title / body | Human-readable content, already localized |
read / readAt | Read state. readAt is null until marked read |
metadata | Optional event-specific payload |
List Notifications
GET /api/v1/merchants/{merchantId}/notifications/inappPaginated, newest first.
Query parameters
| Name | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 50 | Items per page |
const response = await axios.get(
`https://api.koywe.com/api/v1/merchants/${merchantId}/notifications/inapp`,
{
params: { page: 1, limit: 50 },
headers: { Authorization: `Bearer ${token}` }
}
);
const { data, total, page, limit } = response.data;Unread Count
GET /api/v1/merchants/{merchantId}/notifications/inapp/unread-countReturns { "count": 3 }. Use this for the badge on your bell icon — it’s cheaper than paginating the full list.
Mark One as Read
PATCH /api/v1/merchants/{merchantId}/notifications/inapp/{notificationId}/readReturns { "ok": true }.
Returns error NE00001 if the notification does not exist, and NE00002 if it belongs to a different merchant.
Mark All as Read
PATCH /api/v1/merchants/{merchantId}/notifications/inapp/read-allReturns { "updated": 5 } — the number of notifications that transitioned from unread to read.
Email Notification Settings
Email notifications are off by default. Enable them per merchant and provide a list of recipient addresses. Koywe then emails the recipients on order events alongside the in-app notification and webhook.
Get Settings
GET /api/v1/merchants/{merchantId}/notification-settingsReturns the configured settings, or the defaults if nothing has been set yet:
{
"emailEnabled": false,
"recipients": []
}Update Settings
PUT /api/v1/merchants/{merchantId}/notification-settings{
"emailEnabled": true,
"recipients": ["ops@merchant.com", "finance@merchant.com"]
}Rules:
emailEnabledis required.- When
emailEnabledistrue, at least one valid email address must be provided inrecipients. - When
emailEnabledisfalse,recipientsmay be omitted and the existing recipient list is preserved until you explicitly clear it. - When
recipientsis sent, it replaces the entire existing list. To clear all recipients, send an empty array (recipients: []); omitting the field does not clear previously configured recipients.
await axios.put(
`https://api.koywe.com/api/v1/merchants/${merchantId}/notification-settings`,
{
emailEnabled: true,
recipients: ['ops@merchant.com', 'finance@merchant.com']
},
{ headers: { Authorization: `Bearer ${token}` } }
);When to Use What
| Channel | Audience | Best for |
|---|---|---|
| Webhooks | Your servers | Fulfilling orders, reconciliation, anything automated |
| In-app | Dashboard users | Live activity feed, “what just happened” |
| Ops / finance / support | Out-of-band alerts for teams not staring at the dashboard |
The three channels are independent — an order event fires all three where configured.