action squareup_retrieve_subscription { label: "RetrieveSubscription" description: "Retrieves a subscription." provider: squareup method: GET path: "/v2/subscriptions/{subscription_id}" encoding: json input: { type: "object" properties: { subscription_id: { type: "string" } } required: ["subscription_id"] additionalProperties: false } output: { type: "object" description: "Defines the fields that are included in the response from the\n[RetrieveSubscription](https://developer.squareup.com/reference/square_2021-08-18/subscriptions-api/retrieve-subscription) endpoint." properties: { errors: { type: "array" description: "Information about errors encountered during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } subscription: { type: "object" description: "Represents a customer subscription to a subscription plan.\nFor an overview of the `Subscription` type, see\n[Subscription object](https://developer.squareup.com/docs/subscriptions-api/overview#subscription-object-overview)." properties: { canceled_date: { type: "string" description: "The subscription cancellation date, in YYYY-MM-DD format (for\nexample, 2013-01-15). On this date, the subscription status changes\nto `CANCELED` and the subscription billing stops.\nIf you don't set this field, the subscription plan dictates if and\nwhen subscription ends.\n\nYou cannot update this field, you can only clear it." } card_id: { type: "string" description: "The ID of the [customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) [card](https://developer.squareup.com/reference/square_2021-08-18/objects/Card)\nthat is charged for the subscription." } charged_through_date: { type: "string" description: "The date up to which the customer is invoiced for the\nsubscription, in YYYY-MM-DD format (for example, 2013-01-15).\n\nAfter the invoice is sent for a given billing period,\nthis date will be the last day of the billing period.\nFor example,\nsuppose for the month of May a customer gets an invoice\n(or charged the card) on May 1. For the monthly billing scenario,\nthis date is then set to May 31." } created_at: { type: "string" description: "The timestamp when the subscription was created, in RFC 3339 format." } customer_id: { type: "string" description: "The ID of the associated [customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) profile." } id: { type: "string" description: "The Square-assigned ID of the subscription." } invoice_ids: { type: "array" description: "The IDs of the [invoices](https://developer.squareup.com/reference/square_2021-08-18/objects/Invoice) created for the\nsubscription, listed in order when the invoices were created\n(oldest invoices appear first)." items: { type: "string" } } location_id: { type: "string" description: "The ID of the location associated with the subscription." } plan_id: { type: "string" description: "The ID of the associated [subscription plan](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogSubscriptionPlan)." } price_override_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } start_date: { type: "string" description: "The start date of the subscription, in YYYY-MM-DD format (for example,\n2013-01-15)." } status: { type: "string" description: "The current status of the subscription." } tax_percentage: { type: "string" description: "The tax amount applied when billing the subscription. The\npercentage is expressed in decimal form, using a `'.'` as the decimal\nseparator and without a `'%'` sign. For example, a value of `7.5`\ncorresponds to 7.5%." } timezone: { type: "string" description: "Timezone that will be used in date calculations for the subscription.\nDefaults to the timezone of the location based on `location_id`.\nFormat: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`)." } version: { type: "integer" format: "int64" description: "The version of the object. When updating an object, the version\nsupplied must match the version in the database, otherwise the write will\nbe rejected as conflicting." } } } } } }