Handle webhook events
Follow the steps listed below to handle webhook events sent from the Cobo payments service:- Create a webhook endpoint.
- Choose a server environment.
- Define an endpoint URL.
- Implement the handling logic on the server side.
- Parse the API request.
- Verify the signature.
- Respond to the API request.
- Add other handling logic (if applicable).
- Register the endpoint on Cobo Portal.
When registering a webhook endpoint, you need to specify the event types to which you want to subscribe.
Webhook request body
When an event is triggered, the Cobo payments service sends an HTTP POST request to your registered endpoint. The request body is a JSON object with the following structure.Required fields
| Field | Type | Description |
|---|---|---|
event_id | string (UUID) | The unique identifier of the event. Use event_id to deduplicate retried deliveries. |
url | string | The registered webhook endpoint URL. |
created_timestamp | integer (int64) | The time when the event was triggered, in Unix timestamp format (milliseconds). This value remains unchanged across retries. |
type | string | The event type. See Events and status for all event types and their trigger conditions. |
data | object | The event-specific payload. The schema depends on the type field — see Events and status for per-event schemas. |
Optional fields
| Field | Type | Description |
|---|---|---|
status | string | The delivery status of the event. One of: Success, Retrying, Failed. |
next_retry_timestamp | integer (int64) | The scheduled time of the next retry attempt, in Unix timestamp format (milliseconds). Only present when status is Retrying. |
retries_left | integer | The number of retry attempts remaining. Only present when status is Retrying. |
