Overview
Webhooks provide an asynchronous alternative to the 90-second long-polling model used by the standard payment endpoint. Instead of waiting for a terminal response, you can receive payment results via HTTP callbacks to your server. When to use webhooks:- Your integration cannot handle 90-second HTTP timeouts
- You prefer event-driven architecture
- You need to process payments asynchronously
Endpoint Limits
Each group can configure up to 16 webhook endpoints. This limit applies across all event type subscriptions.Managing Webhook Endpoints
Create Endpoint
Register a new webhook endpoint to receive payment notifications.Request Body
The HTTPS URL where webhook payloads will be delivered. Must be publicly accessible.Example:
"https://api.yourcompany.com/webhooks/payments"Array of event types to subscribe to.Values:
payment.completed, payment.failed, payment.cancelled, payment.timeoutHuman-readable description for this endpoint.Example:
"Production payment notifications"Custom key-value pairs to associate with this endpoint.
Request Example
Response (201 Created)
The
secret is only returned when creating the endpoint. Store it securely for signature verification. You cannot retrieve it later.Code Example
List Endpoints
Retrieve all webhook endpoints for your group.Response (200 OK)
Code Example
Get Endpoint
Retrieve a specific webhook endpoint by ID.Path Parameters
The unique identifier of the webhook endpoint.
Response (200 OK)
Update Endpoint
Update an existing webhook endpoint’s configuration.Path Parameters
The unique identifier of the webhook endpoint.
Request Body
Updated HTTPS URL for webhook delivery. A validation ping is sent to verify the new URL.
Updated array of event types to subscribe to.
Updated description for this endpoint.
Endpoint status. Set to
disabled to pause webhook delivery without deleting the endpoint.Values: active, disabledUpdated custom metadata.
Request Example
Response (200 OK)
Code Example
Delete Endpoint
Remove a webhook endpoint. This action is permanent.Path Parameters
The unique identifier of the webhook endpoint.
Response (204 No Content)
No response body is returned on successful deletion.Code Example
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
WEBHOOKS_NOT_CONFIGURED | 400 | Webhooks feature is not enabled for your group |
ENDPOINT_LIMIT_REACHED | 400 | Maximum of 16 endpoints per group reached |
INVALID_ENDPOINT_URL | 400 | URL must use HTTPS protocol |
ENDPOINT_PING_FAILED | 400 | Validation ping to endpoint URL failed |
INVALID_EVENT_TYPE | 400 | Unknown event type in events array |
ENDPOINT_NOT_FOUND | 404 | Webhook endpoint does not exist |