• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Update webhook subscription BETA

PUT /v2/webhooks/subscriptions/{subscription_id}

Updates a webhook subscription.

Name Description
subscription_id
string

Required

[REQUIRED] The ID of the Subscription to update.

Name Description
subscription
WebhookSubscription

The Subscription to update.

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request.

subscription
WebhookSubscription

The updated Subscription.

Examples

You are viewing an old version of the API
PUT /v2/webhooks/subscriptions/{subscription_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5 \
  -X PUT \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "subscription": {
      "name": "Updated Example Webhook Subscription",
      "enabled": false
    }
  }'
Response JSON
{
  "subscription": {
    "id": "wbhk_b35f6b3145074cf9ad513610786c19d5",
    "name": "Updated Example Webhook Subscription",
    "enabled": false,
    "event_types": [
      "payment.created",
      "payment.updated"
    ],
    "notification_url": "https://example-webhook-url.com",
    "api_version": "2021-12-15",
    "created_at": "2022-01-10 23:29:48 +0000 UTC",
    "updated_at": "2022-01-10 23:45:51 +0000 UTC"
  }
}