Nice Paydocs API version 2026-12-01 OpenAPI

Webhooks

Generated from the OpenAPI document, API version 2026-12-01. Money is always a decimal string with a currency code.

List webhook endpoints

GET /v1/webhook-endpoints

  • Scope: webhooks:write
  • SDK: listWebhookEndpoints()
  • Success: HTTP 200

Example

const result = await nicepay.listWebhookEndpoints();

Response — a list of WebhookEndpoint objects

FieldTypeNotes
object"list"
dataarray of object
data[].idstring
data[].object"webhook_endpoint"
data[].livemodeboolean
data[].urlstring
data[].event_typesarray of enum
data[].statusenumone of enabled disabled
data[].disabled_reasonstring | null
data[].descriptionstring | null
data[].api_versionstring
data[].created_attimestamp
has_moreboolean
Example response
JSON
{
  "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

FieldTypeRequiredNotes
urlstringyesat most 2048 characters
event_typesarray of enumat most 24 items; default []
descriptionstringat most 200 characters

Example

const result = await nicepay.createWebhookEndpoint({
  "url": "url"
});

Response — the WebhookEndpoint object

FieldTypeNotes
idstring
object"webhook_endpoint"
livemodeboolean
urlstring
event_typesarray of enum
statusenumone of enabled disabled
disabled_reasonstring | null
descriptionstring | null
api_versionstring
created_attimestamp
Example response
JSON
{
  "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

FieldTypeRequiredNotes
idstringyes

Example

const result = await nicepay.getWebhookEndpoint("<id>");

Response — the WebhookEndpoint object

FieldTypeNotes
idstring
object"webhook_endpoint"
livemodeboolean
urlstring
event_typesarray of enum
statusenumone of enabled disabled
disabled_reasonstring | null
descriptionstring | null
api_versionstring
created_attimestamp
Example response
JSON
{
  "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

FieldTypeRequiredNotes
idstringyes

Body

FieldTypeRequiredNotes
urlstringat most 2048 characters
event_typesarray of enumat most 24 items
descriptionstring or nullat most 200 characters; may be null
enabledboolean

Example

const result = await nicepay.updateWebhookEndpoint("<id>");

Response — the WebhookEndpoint object

FieldTypeNotes
idstring
object"webhook_endpoint"
livemodeboolean
urlstring
event_typesarray of enum
statusenumone of enabled disabled
disabled_reasonstring | null
descriptionstring | null
api_versionstring
created_attimestamp
Example response
JSON
{
  "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

FieldTypeRequiredNotes
idstringyes

Example

const result = await nicepay.deleteWebhookEndpoint("<id>");

Response

FieldTypeNotes
idstring
objectstring
deleted"true"
Example response
JSON
{
  "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();

Response

FieldTypeNotes
keysarray of object
keys[].kty"OKP"
keys[].crv"Ed25519"
keys[].alg"EdDSA"
keys[].use"sig"
keys[].kidstring
keys[].xstring
Example response
JSON
{
  "keys": [
    {
      "kty": "OKP",
      "crv": "Ed25519",
      "alg": "EdDSA",
      "use": "sig",
      "kid": "kid",
      "x": "x"
    }
  ]
}