Registers a URL to receive real-time events (e.g., checkout.session.completed, purchase.succeeded).
Request Body
The webhook endpoint URL where events will be sent
Array of event types to subscribe to (e.g., [“checkout.session.completed”, “payment.succeeded”])
Whether the webhook endpoint is active (default: true)
Custom metadata to attach to the webhook endpoint
Response
Unique identifier for the webhook endpoint
The merchant’s unique identifier
Array of subscribed event types
Whether the endpoint is active
ISO 8601 timestamp when the endpoint was created
ISO 8601 timestamp when the endpoint was last updated
Example Request
{
"url": "https://example.com/webhooks",
"events": [
"checkout.session.completed",
"purchase.succeeded",
"transfer.completed"
],
"active": true,
"metadata": {}
}
Example Response
{
"id": "webhook_001",
"merchantId": "merchant_456",
"url": "https://example.com/webhooks",
"events": [
"checkout.session.completed",
"purchase.succeeded",
"transfer.completed"
],
"active": true,
"metadata": {},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
Error Responses
Invalid or missing authentication token
An unexpected error occurred on the server
Authentication
This endpoint requires Bearer token authentication.