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

You are viewing an old version of the API
List webhook subscriptions BETA

GET /v2/webhooks/subscriptions

Lists all webhook subscriptions owned by your application.

Name Description
cursor
string

A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.

For more information, see Pagination.

include_disabled
boolean

Includes disabled Subscriptions. By default, all enabled Subscriptions are returned.

sort_order
string

Sorts the returned list by when the Subscription was created with the specified order. This field defaults to ASC.

limit
integer (32-bit)

The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. The default value of 100 is also the maximum allowed value.

Default: 100

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request.

subscriptions
WebhookSubscription [ ]

The requested list of Subscriptions.

cursor
string

The pagination cursor to be used in a subsequent request. If empty, this is the final response.

For more information, see Pagination.

Examples

You are viewing an old version of the API
GET /v2/webhooks/subscriptions
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/webhooks/subscriptions \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "subscriptions": [
    {
      "id": "wbhk_b35f6b3145074cf9ad513610786c19d5",
      "name": "Example Webhook Subscription",
      "enabled": true,
      "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:29:48 +0000 UTC"
    }
  ]
}