{ "opencollection": "1.0.0", "info": { "name": "Square ApplePay Subscriptions API", "version": "2.0" }, "items": [ { "info": { "name": "Subscriptions", "type": "folder" }, "items": [ { "info": { "name": "Square Create Subscription", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Enrolls a customer in a subscription.\n\nIf you provide a card on file in the request, Square charges the card for\nthe subscription. Otherwise, Square sends an invoice to the customer's email\naddress. The subscription starts immediately, unless the request includes\nthe optional `start_date`. Each individual subscription is associated with a particular location.\n\nFor more information, see [Create a subscription](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#create-a-sub" }, { "info": { "name": "Square Bulk Swap Plan", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/bulk-swap-plan", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Schedules a plan variation change for all active subscriptions under a given plan\nvariation. For more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations)." }, { "info": { "name": "Square Search Subscriptions", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/search", "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Searches for subscriptions.\n\nResults are ordered chronologically by subscription creation date. If\nthe request specifies more than one location ID,\nthe endpoint orders the result\nby location ID, and then by creation date within each location. If no locations are given\nin the query, all locations are searched.\n\nYou can also optionally specify `customer_ids` to search by customer.\nIf left unset, all customers\nassociated with the specified locations are returned.\nIf the request specifies customer I" }, { "info": { "name": "Square Retrieve Subscription", "type": "http" }, "http": { "method": "GET", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to retrieve." }, { "name": "include", "value": "", "type": "query", "description": "A query parameter to specify related information to be included in the response. \n\nThe supported query parameter values are: \n\n- `actions`: to include scheduled actions on the targeted subscription." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Retrieves a specific subscription." }, { "info": { "name": "Square Update Subscription", "type": "http" }, "http": { "method": "PUT", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to update." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Updates a subscription by modifying or clearing `subscription` field values.\nTo clear a field, set its value to `null`." }, { "info": { "name": "Square Delete Subscription Action", "type": "http" }, "http": { "method": "DELETE", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/actions/:action_id", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription the targeted action is to act upon." }, { "name": "action_id", "value": "", "type": "path", "description": "The ID of the targeted action to be deleted." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Deletes a scheduled action for a subscription." }, { "info": { "name": "Square Change Billing Anchor Date", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/billing-anchor", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to update the billing anchor date." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates)\nfor a subscription." }, { "info": { "name": "Square Cancel Subscription", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/cancel", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to cancel." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Schedules a `CANCEL` action to cancel an active subscription. This \nsets the `canceled_date` field to the end of the active billing period. After this date, \nthe subscription status changes from ACTIVE to CANCELED." }, { "info": { "name": "Square List Subscription Events", "type": "http" }, "http": { "method": "GET", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/events", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to retrieve the events for." }, { "name": "cursor", "value": "", "type": "query", "description": "When the total number of resulting subscription events exceeds the limit of a paged response, \nspecify the cursor returned from a preceding response here to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, { "name": "limit", "value": "", "type": "query", "description": "The upper limit on the number of subscription events to return\nin a paged response." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Lists all [events](https://developer.squareup.com/docs/subscriptions-api/actions-events) for a specific subscription." }, { "info": { "name": "Square Pause Subscription", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/pause", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to pause." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Schedules a `PAUSE` action to pause an active subscription." }, { "info": { "name": "Square Resume Subscription", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/resume", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to resume." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Schedules a `RESUME` action to resume a paused or a deactivated subscription." }, { "info": { "name": "Square Swap Plan", "type": "http" }, "http": { "method": "POST", "url": "https://connect.squareup.com/v2/subscriptions/:subscription_id/swap-plan", "params": [ { "name": "subscription_id", "value": "", "type": "path", "description": "The ID of the subscription to swap the subscription plan for." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "accessTokenUrl": "https://connect.squareup.com/oauth2/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Schedules a `SWAP_PLAN` action to swap a subscription plan variation in an existing subscription. \nFor more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations)." } ] } ], "bundled": true }