curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/webhooks/subscriptions/7c1d2e3f-... \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"active": false
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
client.webhooks.subscriptions.update("7c1d2e3f-...", active=False)
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
await client.webhooks.subscriptions.update("7c1d2e3f-...", { active: false });
{
"id": "7c1d2e3f-...",
"application_id": "2e35e07e-...",
"target_url": "https://example.com/webhooks/hostpay",
"events": ["deposit.completed", "payout.failed"],
"active": true,
"ip_allowlist": null,
"payload_version": "2025-01",
"secret_preview": "...k3Qz",
"created_at": "2026-07-04T10:30:00Z",
"updated_at": "2026-07-04T10:30:00Z"
}
{
"detail": "Subscription not found"
}
Webhook Subscriptions
Update Subscription
Update a webhook subscription — only the fields you send are changed.
PATCH
/
api
/
v1
/
webhooks
/
subscriptions
/
{subscription_id}
curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/webhooks/subscriptions/7c1d2e3f-... \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"active": false
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
client.webhooks.subscriptions.update("7c1d2e3f-...", active=False)
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
await client.webhooks.subscriptions.update("7c1d2e3f-...", { active: false });
{
"id": "7c1d2e3f-...",
"application_id": "2e35e07e-...",
"target_url": "https://example.com/webhooks/hostpay",
"events": ["deposit.completed", "payout.failed"],
"active": true,
"ip_allowlist": null,
"payload_version": "2025-01",
"secret_preview": "...k3Qz",
"created_at": "2026-07-04T10:30:00Z",
"updated_at": "2026-07-04T10:30:00Z"
}
{
"detail": "Subscription not found"
}
Partial update: send only the fields to change. Use
active: false to pause deliveries without deleting the subscription.
An inactive subscription rejects manual dispatch with HTTP 409. The worker can
mark its queued deliveries dead; reactivating the subscription does not revive
final deliveries. Coordinate changes rather than using pause as a guaranteed
way to preserve queued events.
Path Parameters
string
required
The subscription to update.
Request Body
string
Final public URL accepting POST without redirects. Live events require HTTPS
with valid TLS; sandbox events may use public HTTP. Destination safety is checked
on update and again on delivery. See the upgrade checklist.
string[]
Replace the subscribed event types.
boolean
Enable or pause deliveries.
string[]
Replace the source-IP allowlist.
string
Change the payload schema version.
Response
The updated subscription, same shape as list subscriptions.{
"id": "7c1d2e3f-...",
"application_id": "2e35e07e-...",
"target_url": "https://example.com/webhooks/hostpay",
"events": ["deposit.completed", "payout.failed"],
"active": true,
"ip_allowlist": null,
"payload_version": "2025-01",
"secret_preview": "...k3Qz",
"created_at": "2026-07-04T10:30:00Z",
"updated_at": "2026-07-04T10:30:00Z"
}
{
"detail": "Subscription not found"
}
curl --request PATCH \
--url https://hpay-api.host-sl.com/api/v1/webhooks/subscriptions/7c1d2e3f-... \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"active": false
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
client.webhooks.subscriptions.update("7c1d2e3f-...", active=False)
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
await client.webhooks.subscriptions.update("7c1d2e3f-...", { active: false });