Channel Custom Booking Callback Notification
Updated: 2025-09-03 18:46:46
Purpose
For channels that have enabled custom booking and configured a booking callback URL, when a user enters the viewing page during the booking period and clicks the booking or cancel booking button on the viewing page, a POST request will be submitted to the user's custom callback interface.
Callback Failure Retry
- If the interface does not return an HTTP status 200 code, the callback is considered to have failed. In case of failure, the callback will be retried 3 times.
Callback Parameter Description
Booking/Cancel Booking Callback
- Request method: POST
URL Parameters
| Parameter | Type & Range | Description |
|---|---|---|
| timestamp | long | 13-digit timestamp |
| sign | string | Signature. The signature generation rule is MD5(appSecret + timestamp). To prevent callback request forgery, please verify the correctness of the sign value. |
BODY Parameters:
| Parameter | Type & Range | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| sessionId | String | Session ID |
| viewerId | String | Viewer ID |
| externalViewerId | String | External ID (only available when the user system is enabled and an external ID is used) |
| type | String | User action (booking successful: booking / cancel booking: cancel) |
| source | String | Booking source (pre-live booking: pre_live / in-live booking: in_live) |
| sourceChannelId | Integer | Source live room ID |
| operateTime | String | Trigger time, format: yyyy-MM-dd HH:mm:ss |
| startTime | String | Live start time, format: yyyy-MM-dd HH:mm:ss |
| promoteId | String | Channel ID |
Callback Data Example
Example request URL: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
Example booking request body (body parameter: application/json)
{
"channelId": 100001,
"sessionId": "100001_20231207140000",
"viewerId": "viewer_123456",
"externalViewerId": "ext_789012",
"type": "booking",
"source": "pre_live",
"sourceChannelId": 100001,
"operateTime": "2023-12-07 10:30:00",
"startTime": "2023-12-07 14:00:00",
"promoteId": "xxxxxxxxx"
}
Example cancel booking request body:
{
"channelId": 100001,
"sessionId": "100001_20231207140000",
"viewerId": "viewer_123456",
"externalViewerId": "ext_789012",
"type": "cancel",
"source": "pre_live",
"sourceChannelId": 100001,
"operateTime": "2023-12-07 10:30:00",
"startTime": "2023-12-07 14:00:00",
"promoteId": "xxxxxxxxx"
}
