curl --request PATCH \
--url https://api.qbank.cl/platform/v1/webhooks/subscriptions/{subscriptionID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "disabled"
}
'
{
"id": "8e7f6a5b-4c3d-2e1f-0a9b-8c7d6e5f4a3b",
"event_type": "payout_status_changed",
"callback_url": "https://api.myapp.com/webhooks/cbpay",
"status": "disabled",
"created_at": "2026-07-07T12:00:00Z"
}{
"error": "invalid_status",
"message": "status must be active or disabled"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}停用或重新启用 webhook 订阅
将账户的某个订阅在 active 和 disabled 之间切换。disabled 状态的订阅停止接收新事件;已排队的投递仍会发出。幂等:重复当前状态返回 200 且无变化。订阅永远不会被删除——停用即退订。强制执行归属权:其他账户的 订阅返回 404(与不存在的订阅无法区分)。
PATCH
/
v1
/
webhooks
/
subscriptions
/
{subscriptionID}
curl --request PATCH \
--url https://api.qbank.cl/platform/v1/webhooks/subscriptions/{subscriptionID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "disabled"
}
'
{
"id": "8e7f6a5b-4c3d-2e1f-0a9b-8c7d6e5f4a3b",
"event_type": "payout_status_changed",
"callback_url": "https://api.myapp.com/webhooks/cbpay",
"status": "disabled",
"created_at": "2026-07-07T12:00:00Z"
}{
"error": "invalid_status",
"message": "status must be active or disabled"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
路径参数
请求体
application/json
可用选项:
active, disabled