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

You are viewing an old version of the API
List subscription events

GET /v2/subscriptions/{subscription_id}/events

Lists all events for a specific subscription.


Permissions
SUBSCRIPTIONS_READ
Guide
Subscriptions Guide
Try in API Explorer
Name Description
subscription_id
string

Required

The ID of the subscription to retrieve the events for.

Name Description
cursor
string

When the total number of resulting subscription events exceeds the limit of a paged response, specify the cursor returned from a preceding response here to fetch the next set of results. If the cursor is unset, the response contains the last page of the results.

For more information, see Pagination.

limit
integer (32-bit)

The upper limit on the number of subscription events to return in a paged response.

Response Fields

Name Description
errors
Error [ ]

Errors encountered during the request.

subscription_events
SubscriptionEvent [ ]

The retrieved subscription events.

cursor
string

When the total number of resulting subscription events exceeds the limit of a paged response, the response includes a cursor for you to use in a subsequent request to fetch the next set of events. If the cursor is unset, the response contains the last page of the results.

For more information, see Pagination.

Examples

You are viewing an old version of the API
GET /v2/subscriptions/{subscription_id}/events
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/subscriptions/subscription_id0/events \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "subscription_events": [
    {
      "id": "06809161-3867-4598-8269-8aea5be4f9de",
      "subscription_event_type": "START_SUBSCRIPTION",
      "effective_date": "2020-04-24",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
    },
    {
      "id": "f2736603-cd2e-47ec-8675-f815fff54f88",
      "subscription_event_type": "DEACTIVATE_SUBSCRIPTION",
      "effective_date": "2020-05-01",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H",
      "info": {
        "detail": "The customer with ID `V74BMG0GPS2KNCWJE1BTYJ37Y0` does not have a name on record.",
        "code": "CUSTOMER_NO_NAME"
      }
    },
    {
      "id": "b426fc85-6859-450b-b0d0-fe3a5d1b565f",
      "subscription_event_type": "RESUME_SUBSCRIPTION",
      "effective_date": "2022-05-01",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
    },
    {
      "id": "09f14de1-2f53-4dae-9091-49aa53f83d01",
      "subscription_event_type": "PAUSE_SUBSCRIPTION",
      "effective_date": "2022-05-02",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
    },
    {
      "id": "f28a73ac-1a1b-4b0f-8eeb-709a72945776",
      "subscription_event_type": "RESUME_SUBSCRIPTION",
      "effective_date": "2020-05-02",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
    },
    {
      "id": "a0c08083-5db0-4800-85c7-d398de4fbb6e",
      "subscription_event_type": "STOP_SUBSCRIPTION",
      "effective_date": "2020-05-06",
      "plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
    }
  ]
}