List subscription events BETA
Lists all events for a specific subscription.
In the current implementation, only START_SUBSCRIPTION
and STOP_SUBSCRIPTION
(when the subscription was canceled) events are returned.
Name | Description |
---|---|
subscription_
Required
|
The ID of the subscription to retrieve the events for. |
Name | Description |
---|---|
cursor
|
A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see Pagination. |
limit
|
The upper limit on the number of subscription events to return in the response. Default: |
Response Fields
Name | Description |
---|---|
errors
|
Information about errors encountered during the request. |
subscription_
|
The |
cursor
|
When a response is truncated, it includes a cursor that you can use in a subsequent request to fetch the next set of events. If empty, this is the final response. For more information, see Pagination. |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/subscriptions/subscription_id0/events \
-H 'Square-Version: 2021-01-21' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
{
"subscription_events": [
{
"id": "06809161-3867-4598-8269-8aea5be4f9de",
"subscription_event_type": "START_SUBSCRIPTION",
"effective_date": "2020-04-24",
"plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
},
{
"id": "a0c08083-5db0-4800-85c7-d398de4fbb6e",
"subscription_event_type": "STOP_SUBSCRIPTION",
"effective_date": "2020-05-06",
"plan_id": "6JHXF3B2CW3YKHDV4XEM674H"
}
]
}