Retrieve subscription
GET
/v2/subscriptions/{subscription_id}
Retrieves a subscription.
Name | Description |
---|---|
subscription_
Required
|
The ID of the subscription to retrieve. |
Name | Description |
---|---|
include
Beta
|
A query parameter to specify related information to be included in the response. The supported query parameter values are:
|
Response Fields
Name | Description |
---|---|
errors
|
Errors encountered during the request. |
subscription
|
The subscription retrieved. |
Examples
GET
/v2/subscriptions/{subscription_id}
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/subscriptions/8151fc89-da15-4eb9-a685-1a70883cebfc \
-H 'Square-Version: 2023-03-15' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Response JSON
{
"subscription": {
"id": "8151fc89-da15-4eb9-a685-1a70883cebfc",
"location_id": "S8GWD5R9QB376",
"plan_id": "6JHXF3B2CW3YKHDV4XEM674H",
"customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
"start_date": "2021-10-20",
"charged_through_date": "2021-11-20",
"status": "ACTIVE",
"invoice_ids": [
"grebK0Q_l8H4fqoMMVvt-Q",
"rcX_i3sNmHTGKhI4W2mceA"
],
"price_override_money": {
"amount": 1000,
"currency": "USD"
},
"created_at": "2021-10-20T21:53:10Z",
"paid_until_date": "2021-11-20",
"timezone": "America/Los_Angeles",
"source": {
"name": "My App"
}
}
}