Webhooks
Generated from the OpenAPI document, API version 2026-12-01. Money is always a decimal string with a currency code.
- GET
/v1/webhook-endpointsList webhook endpoints - POST
/v1/webhook-endpointsAdd a webhook endpoint - GET
/v1/webhook-endpoints/{id}Retrieve a webhook endpoint - PATCH
/v1/webhook-endpoints/{id}Change a webhook endpoint - DELETE
/v1/webhook-endpoints/{id}Remove a webhook endpoint - GET
/.well-known/webhook-keys.jsonPublic keys that sign webhooks (JWKS)
List webhook endpoints
GET /v1/webhook-endpoints
- Scope:
webhooks:write - SDK:
listWebhookEndpoints() - Success: HTTP 200
Example
const result = await nicepay.listWebhookEndpoints();$result = $nicepay->listWebhookEndpoints();Response — a list of WebhookEndpoint objects
| Field | Type | Notes |
|---|---|---|
object | "list" | |
data | array of object | |
data[].id | string | |
data[].object | "webhook_endpoint" | |
data[].livemode | boolean | |
data[].url | string | |
data[].event_types | array of enum | |
data[].status | enum | one of enabled disabled |
data[].disabled_reason | string | null | |
data[].description | string | null | |
data[].api_version | string | |
data[].created_at | timestamp | |
has_more | boolean |
Example response
{
"object": "list",
"data": [
{
"id": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "webhook_endpoint",
"livemode": true,
"url": "url",
"event_types": [
"payin.created"
],
"status": "enabled",
"disabled_reason": "disabled_reason",
"description": "description",
"api_version": "api_version",
"created_at": "2026-11-23T10:00:00.000Z"
}
],
"has_more": true
}Add a webhook endpoint
POST /v1/webhook-endpoints
- Scope:
webhooks:write - SDK:
createWebhookEndpoint() - Success: HTTP 201
Body
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes | at most 2048 characters |
event_types | array of enum | at most 24 items; default [] | |
description | string | at most 200 characters |
Example
const result = await nicepay.createWebhookEndpoint({
"url": "url"
});$result = $nicepay->createWebhookEndpoint([
'url' => 'url',
]);Response — the WebhookEndpoint object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "webhook_endpoint" | |
livemode | boolean | |
url | string | |
event_types | array of enum | |
status | enum | one of enabled disabled |
disabled_reason | string | null | |
description | string | null | |
api_version | string | |
created_at | timestamp |
Example response
{
"id": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "webhook_endpoint",
"livemode": true,
"url": "url",
"event_types": [
"payin.created"
],
"status": "enabled",
"disabled_reason": "disabled_reason",
"description": "description",
"api_version": "api_version",
"created_at": "2026-11-23T10:00:00.000Z"
}Retrieve a webhook endpoint
GET /v1/webhook-endpoints/{id}
- Scope:
webhooks:write - SDK:
getWebhookEndpoint() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Example
const result = await nicepay.getWebhookEndpoint("<id>");$result = $nicepay->getWebhookEndpoint('<id>');Response — the WebhookEndpoint object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "webhook_endpoint" | |
livemode | boolean | |
url | string | |
event_types | array of enum | |
status | enum | one of enabled disabled |
disabled_reason | string | null | |
description | string | null | |
api_version | string | |
created_at | timestamp |
Example response
{
"id": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "webhook_endpoint",
"livemode": true,
"url": "url",
"event_types": [
"payin.created"
],
"status": "enabled",
"disabled_reason": "disabled_reason",
"description": "description",
"api_version": "api_version",
"created_at": "2026-11-23T10:00:00.000Z"
}Change a webhook endpoint
PATCH /v1/webhook-endpoints/{id}
- Scope:
webhooks:write - SDK:
updateWebhookEndpoint() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | at most 2048 characters | |
event_types | array of enum | at most 24 items | |
description | string or null | at most 200 characters; may be null | |
enabled | boolean |
Example
const result = await nicepay.updateWebhookEndpoint("<id>");$result = $nicepay->updateWebhookEndpoint('<id>');Response — the WebhookEndpoint object
| Field | Type | Notes |
|---|---|---|
id | string | |
object | "webhook_endpoint" | |
livemode | boolean | |
url | string | |
event_types | array of enum | |
status | enum | one of enabled disabled |
disabled_reason | string | null | |
description | string | null | |
api_version | string | |
created_at | timestamp |
Example response
{
"id": "we_01JD3QH2Y8ZKX4M9T6V0R1B2C3",
"object": "webhook_endpoint",
"livemode": true,
"url": "url",
"event_types": [
"payin.created"
],
"status": "enabled",
"disabled_reason": "disabled_reason",
"description": "description",
"api_version": "api_version",
"created_at": "2026-11-23T10:00:00.000Z"
}Remove a webhook endpoint
DELETE /v1/webhook-endpoints/{id}
- Scope:
webhooks:write - SDK:
deleteWebhookEndpoint() - Success: HTTP 200
Path
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Example
const result = await nicepay.deleteWebhookEndpoint("<id>");$result = $nicepay->deleteWebhookEndpoint('<id>');Response
| Field | Type | Notes |
|---|---|---|
id | string | |
object | string | |
deleted | "true" |
Example response
{
"id": "id",
"object": "object",
"deleted": true
}Public keys that sign webhooks (JWKS)
GET /.well-known/webhook-keys.json
- Scope: none — public, unsigned
- SDK:
webhookKeys() - Success: HTTP 200
Example
const result = await nicepay.webhookKeys();$result = $nicepay->webhookKeys();Response
| Field | Type | Notes |
|---|---|---|
keys | array of object | |
keys[].kty | "OKP" | |
keys[].crv | "Ed25519" | |
keys[].alg | "EdDSA" | |
keys[].use | "sig" | |
keys[].kid | string | |
keys[].x | string |
Example response
{
"keys": [
{
"kty": "OKP",
"crv": "Ed25519",
"alg": "EdDSA",
"use": "sig",
"kid": "kid",
"x": "x"
}
]
}