The Webhook Object
A webhook is an HTTPS endpoint on your server that YouCan Pay calls when an event happens in your account. See Webhooks for the payload your endpoint receives and how to verify it.
Required scope (OAuth only): view-webhooks
Attributes
| Parameter | Type | Description |
|---|---|---|
object | string | Always v2.webhook. |
id | string | The unique identifier for the webhook. |
url | string | The HTTPS URL notifications are delivered to. |
is_live_mode | boolean | Whether the webhook receives live notifications. Webhooks created through this API are always live. |
enabled_events | string|null | A JSON-encoded array of the events this webhook is subscribed to. null means every event. |
created_at | string|null | Date and time the webhook was created. |
WARNING
enabled_events is returned as a JSON-encoded string, not an array, so it needs decoding before use.
Available Events
| Event | Description |
|---|---|
transaction.paid | A transaction was paid. |
transaction.failed | A transaction failed. |
transaction.refunded | A transaction was refunded. |
withdrawal.created | A withdrawal was created. |
Request
Endpoint: https://youcanpay.com/api/v2/webhooks/{webhook_id}Method: GET
bash
$ curl --location -g --request GET 'https://youcanpay.com/api/v2/webhooks/9b1f2c34-5d6e-4a7b-8c9d-0e1f2a3b4c5d' \
--header 'Accept: application/json' \
-u 'YOUR_PRIVATE_KEY:'Response
json
{
"object": "v2.webhook",
"id": "9b1f2c34-5d6e-4a7b-8c9d-0e1f2a3b4c5d",
"url": "https://example.com/webhooks/youcan-pay",
"is_live_mode": true,
"enabled_events": "[\"transaction.paid\",\"transaction.refunded\"]",
"created_at": "2026-09-09 11:04:22"
}