Elastic Path Subscriptions API
Elastic Path Subscriptions enables you to manage your subscriptions plans and pricing options, using offerings. Offerings can contain any combination of pricing options and a plan. When a customer chooses a pricing option, a subscription is created. ### Managing the Subscription Lifecycle The subscription lifecycle is the states that a subscription can go through when a customer subscribes to a service or a plan. A subscription can have the following states: - `pending` - `canceled` - `paused` - `resumed` #### Creating a pending subscription A subscription can be created in a `pending` state. This is useful for several reasons. - If there are subscriptions that require user setup or onboarding, for example, installing software or setting up preferences. This helps reduce shopper frustration during the onboarding process, as the shopper is not paying for a service that they cannot use yet. - When offering a free trial or promotion, keeping the subscription in a pending state until the trial or promotion starts or ends allows you to manage transitions more smoothly. - Before a subscription becomes active, you may need to verify the payment method or authorize the first payment. Keeping the subscription in a pending state allows time to complete these steps without activating the subscription. For a subscription with a `pending` state, you can also configure a `go_live_after` date. The subscription starts from the `go_live_after` date. This is useful as it ensures both the subscription provider and subscriber are clear about when a subscription officially begins. Once the `go_live_after` date is passed, the subscription becomes `active`, initiating the billing and payment runs. If a subscription is activated this way, you can see this in the `timestamp` meta. You can configure a `go_live_after` date to be a past date. This is useful, for example, for backdating a subscription or managing a delay in activating a subscription. Setting the `go_live_after` date in the past ensures the subscriptions timeline correctly aligns with the agreed-upon service start date. :::caution Although, billing runs generate one invoice per subscription, if a `go_live_date` is set far in the past, multiple invoices could be generated over the course of several billing runs, which could be frustrating and confusing to your subscribers. ::: See [create a subscription](/docs/api/subscriptions/create-subscription). #### Cancelling or pausing and resuming subscriptions A subscriber can decide to cancel or pause and/or resume a subscription. The following example describes pausing or canceling and resuming a subscription. 1. The subscriber pauses or cancels the subscription. - The subscription status is `active`. - either `paused` or `cancelled` is set to `true`. - either the `paused_at` or `cancelled_at` timestamp is populated with the date and time the subscription is paused or cancelled. - for cancelled subscriptions, `end_date` indicates when the subscription will expire and end. 2. When the next billing run is due, the billing run checks the subscription state. If the subscription state is paused or cancelled then no invoice is created and the subscription status is updated to `inactive`. 3. Subsequent billing runs skip that subscription completely as the subscription status is `inactive`. 4. If the subscriber resumes the subscription: - either `paused` or `cancelled` is set to `false`. - the `resumed_at` timestamp is populated with the date and time the subscription is resumed. 5. When the next billing run is due, the billing run checks the subscription state. If the `paused` or `cancelled` is set to `false` then the billing run creates an invoice. 6. The payment run processes the invoice. Once the payment succeeds then the payment run updates the status of the subscription to `active`. ### Orders When a customer chooses a subscription, they need to add the subscription to a cart, checkout the cart and then pay for the order. 1. When a customer adds a subscription to cart, this is handled using the `Add subscription to cart` endpoint. 2. Once a subscription has been added to a cart, the [**Checkout API**](/docs/api/carts/checkout-api) converts the cart to an order. 3. Once the order is created, payment needs to be taken. This is handled by Elastic Path Payments Powered by Stripe. See [**Payments**](/docs/api/subscriptions/invoices#payments).
POST
/v2/subscriptions/subscriptions
Create a subscription
#
GET
/v2/subscriptions/subscriptions
List subscriptions
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}
Get subscription
#
PUT
/v2/subscriptions/subscriptions/{subscription_uuid}
Update a subscription
#
DELETE
/v2/subscriptions/subscriptions/{subscription_uuid}
Delete a subscription
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/features/{feature_uuid}
Get a feature in a subscription
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/plans/{plan_uuid}
Get a plan in a subscription
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options/{pricing_option_uuid}
Get a pricing option in a subscription
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/features
List an subscriptions features
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/plans
List subscription plans
#
PUT
/v2/subscriptions/subscriptions/{subscription_uuid}/plans
Manage subscription plans
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options
List subscription pricing options
#
POST
/v2/subscriptions/subscriptions/{subscription_uuid}/states
Create a subscription state
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/states
List subscription states
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/states/{state_uuid}
Get subscription state
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices
List subscription invoices
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments
List subscription invoice payments
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments/{payment_uuid}
Get subscription invoice payment
#
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}
Get subscription invoice
#
Documentation
Specifications
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic-path-subscriptions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: 26.0427.7514362
x-version-timestamp: 2026-04-27 13:44:44+00:00
title: Introduction Subscriptions API
description: 'Elastic Path Subscriptions allows you to offer your customers subscriptions and recurring billing for your plans and services. Elastic Path Subscriptions gives you the flexibility to pause, update, or reactivate your subscription offerings, change subscription cycles and apply discounts.
You can create subscriptions using the Elastic Path Subscriptions API or Commerce Manager See [Subscriptions](/docs/commerce-manager/subscriptions/overview).
Scenarios include:
- repeat products that your customers purchase on a recurring basis.
- membership subscriptions where your customers pay a recurring fee to become members of a particular service, program or organization.
- subscribe and save that allows your customers to subscribe to regular deliveries of products they use frequently, for example, household essentials, or personal care items.
### How Subscriptions Work
Elastic Path Subscriptions enables you to manage your subscriptions plans and pricing options, using offerings. Offerings can contain any combination of plans and pricing options.
Here''s how a typical subscription works:
1. Create your offerings. Offerings are the plan and pricing options that a customer can choose. An offering can consist of many combinations of a plan or pricing options, depending on the plans and services you offer. See [**Offerings**](/docs/api/subscriptions/offerings).
2. When a [**customer**](/docs/api/subscriptions/subscribers) chooses a pricing option, a subscription is created. See [**Subscriptions**](/docs/api/subscriptions/subscriptions).
3. Elastic Path Subscriptions manages the billing and recurring payments associated with the subscription. See [**Invoicing and Payments**](/docs/api/subscriptions/invoices).
### Subscriber Management
Elastic Path Subscriptions enables you to create customer accounts that you can use to manage their subscription details, including payment methods and billing information. See [**Subscribers**](/docs/api/subscriptions/subscribers).
### Invoicing & Payments
Elastic Path Subscriptions enables you to manage the billing and recurring payments associated with your customers subscriptions. Elastic Path Subscriptions provides seamless integration with Elastic Path Payments powered by Stripe. See [**Invoicing and Payments**](/docs/api/subscriptions/invoices).
'
servers:
- url: https://euwest.api.elasticpath.com
description: EU west cluster
- url: https://useast.api.elasticpath.com
description: US east cluster
security:
- BearerToken: []
tags:
- name: Subscriptions
description: "Elastic Path Subscriptions enables you to manage your subscriptions plans and pricing options, using offerings. Offerings can contain any combination of pricing options and a plan. When a customer chooses a pricing option, a subscription is created. \n\n### Managing the Subscription Lifecycle\n\nThe subscription lifecycle is the states that a subscription can go through when a customer subscribes to a service or a plan. \n\nA subscription can have the following states:\n\n- `pending`\n- `canceled`\n- `paused`\n- `resumed`\n\n#### Creating a pending subscription \n\nA subscription can be created in a `pending` state. This is useful for several reasons.\n\n- If there are subscriptions that require user setup or onboarding, for example, installing software or setting up preferences. This helps reduce shopper frustration during the onboarding process, as the shopper is not paying for a service that they cannot use yet.\n- When offering a free trial or promotion, keeping the subscription in a pending state until the trial or promotion starts or ends allows you to manage transitions more smoothly. \n- Before a subscription becomes active, you may need to verify the payment method or authorize the first payment. Keeping the subscription in a pending state allows time to complete these steps without activating the subscription.\n\nFor a subscription with a `pending` state, you can also configure a `go_live_after` date. The subscription starts from the `go_live_after` date. This is useful as it ensures both the subscription provider and subscriber are clear about when a subscription officially begins. Once the `go_live_after` date is passed, the subscription becomes `active`, initiating the billing and payment runs. If a subscription is activated this way, you can see this in the `timestamp` meta. \n\nYou can configure a `go_live_after` date to be a past date. This is useful, for example, for backdating a subscription or managing a delay in activating a subscription. Setting the `go_live_after` date in the past ensures the subscriptions timeline correctly aligns with the agreed-upon service start date. \n\n:::caution\n\nAlthough, billing runs generate one invoice per subscription, if a `go_live_date` is set far in the past, multiple invoices could be generated over the course of several billing runs, which could be frustrating and confusing to your subscribers. \n\n:::\n\nSee [create a subscription](/docs/api/subscriptions/create-subscription).\n\n#### Cancelling or pausing and resuming subscriptions\n\nA subscriber can decide to cancel or pause and/or resume a subscription. The following example describes pausing or canceling and resuming a subscription.\n\n1. The subscriber pauses or cancels the subscription. \n - The subscription status is `active`. \n - either `paused` or `cancelled` is set to `true`.\n - either the `paused_at` or `cancelled_at` timestamp is populated with the date and time the subscription is paused or cancelled.\n - for cancelled subscriptions, `end_date` indicates when the subscription will expire and end.\n2. When the next billing run is due, the billing run checks the subscription state. If the subscription state is paused or cancelled then no invoice is created and the subscription status is updated to `inactive`.\n3. Subsequent billing runs skip that subscription completely as the subscription status is `inactive`.\n4. If the subscriber resumes the subscription:\n - either `paused` or `cancelled` is set to `false`.\n - the `resumed_at` timestamp is populated with the date and time the subscription is resumed.\n5. When the next billing run is due, the billing run checks the subscription state. If the `paused` or `cancelled` is set to `false` then the billing run creates an invoice.\n6. The payment run processes the invoice. Once the payment succeeds then the payment run updates the status of the subscription to `active`.\n\n### Orders\n\nWhen a customer chooses a subscription, they need to add the subscription to a cart, checkout the cart and then pay for the order. \n\n1. When a customer adds a subscription to cart, this is handled using the `Add subscription to cart` endpoint. \n2. Once a subscription has been added to a cart, the [**Checkout API**](/docs/api/carts/checkout-api) converts the cart to an order. \n3. Once the order is created, payment needs to be taken. This is handled by Elastic Path Payments Powered by Stripe. See [**Payments**](/docs/api/subscriptions/invoices#payments).\n"
paths:
/v2/subscriptions/subscriptions:
parameters:
- $ref: '#/components/parameters/Filter'
post:
tags:
- Subscriptions
summary: Create a subscription
operationId: CreateSubscription
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/BuildSubscription'
responses:
'201':
description: Success. The subscription is created.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Subscription'
'400':
$ref: '#/components/responses/ValidationError'
'500':
$ref: '#/components/responses/InternalServerError'
get:
tags:
- Subscriptions
summary: List subscriptions
parameters:
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/SubscriptionInclude'
operationId: ListSubscriptions
description: "Retrieves a list of all subscriptions.\n\n### Filtering\n\nThis endpoint supports filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering).\n\nThe following attributes and operators are supported.\n\n| Operator | Attribute | Description |\n| --- | --- | --- | \n| `eq` | `account_id`, `name`, `email`, `external_ref` | Equals. Checks if the values of two operands are equal. If they are, the condition is true. |\n| `in` | `account_id`, `name`, `email`, `external_ref` | In. Checks if the value is in the specified list. If it is, the condition is true. |\n\n### Including Resources\n\nYou can use the `include` parameter to include the following resources with this endpoint.\n\n| Resource | Required | Description |\n| --- | --- | --- |\n| `pricing_options, plans` | Optional | Retrieves all pricing options and plans associated with a subscription. |\n| `plans` | Optional | Retrieves all plans associated with a subscription. |\n| `pricing_options` | Optional | Retrieves all pricing options associated with a subscription. |\n\nSee [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).\n"
responses:
'200':
description: Success. A list of subscriptions is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Subscription'
included:
$ref: '#/components/schemas/SubscriptionIncludes'
links:
$ref: '#/components/schemas/Links'
'400':
$ref: '#/components/responses/ValidationError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
parameters:
- $ref: '#/components/parameters/SubscriptionInclude'
tags:
- Subscriptions
summary: Get subscription
operationId: GetSubscription
responses:
'200':
description: Success. The details of a subscription are returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Subscription'
included:
$ref: '#/components/schemas/SubscriptionIncludes'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
put:
tags:
- Subscriptions
summary: Update a subscription
description: 'Updates a subscription. For example, a subscriber can switch from one pricing option to another in a subscription.
'
operationId: UpdateSubscription
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/SubscriptionUpdate'
responses:
'200':
description: Success. The subscription is updated.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Subscription'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
delete:
tags:
- Subscriptions
summary: Delete a subscription
operationId: DeleteSubscription
description: 'Deletes a subscription
'
responses:
'204':
description: Success. The subscription is removed.
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/features/{feature_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: feature_uuid
in: path
description: The unique identifier of the feature.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
summary: Get a feature in a subscription
operationId: GetSubscriptionFeature
tags:
- Subscriptions
responses:
'200':
description: Success. The details of the feature are returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OfferingFeature'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/plans/{plan_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: plan_uuid
in: path
description: The unique identifier of the plan.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
summary: Get a plan in a subscription
operationId: GetSubscriptionPlan
tags:
- Subscriptions
responses:
'200':
description: Success. The details of the plan are returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OfferingPlan'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options/{pricing_option_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: pricing_option_uuid
in: path
description: The unique identifier of the pricing option.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
summary: Get a pricing option in a subscription
operationId: GetSubscriptionPricingOption
tags:
- Subscriptions
responses:
'200':
description: Success. The details of the pricing option are returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OfferingPricingOption'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/features:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: List an subscriptions features
operationId: ListSubscriptionFeatures
parameters:
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/PageLimit'
responses:
'200':
description: Success. A list of subscription features is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/OfferingFeature'
links:
$ref: '#/components/schemas/Links'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/plans:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: List subscription plans
description: Retrieves a list of plans associated with the specified subscription. Using this endpoint you can see the plan that is currently active in a subscription. If `active_plan` is `true`, a plan is active in a subscription. If `active_plan` is null, the pricing option is not active.
operationId: ListSubscriptionPlans
responses:
'200':
description: Success. A list of subscription plans is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/OfferingPlan'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
put:
tags:
- Subscriptions
summary: Manage subscription plans
description: Manage subscription plans by replacing, changing or detaching plans on the subscription
operationId: ManageSubscriptionPlans
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
description: A list of plan IDs to manage on the subscription.
items:
$ref: '#/components/schemas/ManageSubscriptionPlans'
example:
data:
- type: attach
plans:
- bafa601f-359c-48da-834e-377b6c0d9466
- type: detach
plans:
- a8aad94d-60fc-44f7-8dfa-299249566ec4
responses:
'204':
description: Success. The subscription's plans have been updated.
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: List subscription pricing options
description: Retrieves a list of pricing options associated with the specified subscription. Using this endpoint you can see the pricing options that are currently active in a subscription. If `active_pricing_option` is `true`, a pricing option is active in a subscription. If `active_pricing_option` is null, the pricing option is not active.
operationId: ListSubscriptionPricingOptions
responses:
'200':
description: Success. A list of subscription pricing options is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/OfferingPricingOption'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/states:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
post:
tags:
- Subscriptions
summary: Create a subscription state
description: "The subscription lifecycle is the states that a subscription can go through when a customer subscribes to a service or a plan. \n\nA subscription can have the following states:\n\n- `pending` \n- `canceled`\n- `paused`\n- `resumed`\nFor more information, see [Managing the Subscription Lifecycle](/docs/api/subscriptions/subscriptions#managing-the-subscription-lifecycle).\n\nImmediate cancellation (`cancel` with `cancel_immediately: true`) ends the subscription and updates entitlements in this request; it does **not** issue refunds or modify paid invoices. Use payments refund flows separately if needed.\n"
operationId: CreateSubscriptionState
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/ChangeState'
responses:
'204':
description: Success. The subscription's state has changed.
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'422':
$ref: '#/components/responses/UnprocessableContent'
'500':
$ref: '#/components/responses/InternalServerError'
get:
tags:
- Subscriptions
summary: List subscription states
operationId: ListSubscriptionStates
responses:
'200':
description: Success. A list of subscription states is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SubscriptionState'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/states/{state_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: state_uuid
in: path
description: The unique identifier of the subscription state.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: Get subscription state
operationId: GetSubscriptionState
responses:
'200':
description: Success. A subscription state is returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SubscriptionState'
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: List subscription invoices
description: Lists all invoices for a given subscription.
parameters:
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/PageLimit'
operationId: ListSubscriptionInvoices
responses:
'200':
description: Success. A list of invoices is returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SubscriptionInvoice'
links:
$ref: '#/components/schemas/Links'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: invoice_uuid
in: path
description: The unique identifier of the invoice.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
parameters:
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/PageLimit'
summary: List subscription invoice payments
description: Lists all invoice payments for a given invoice.
operationId: ListSubscriptionInvoicePayments
responses:
'200':
description: Success. Payments for the invoice are returned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SubscriptionInvoicePayment'
links:
$ref: '#/components/schemas/Links'
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments/{payment_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: invoice_uuid
in: path
description: The unique identifier of the invoice.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: payment_uuid
in: path
description: The unique identifier of the payment.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: Get subscription invoice payment
description: Gets a specific payment for a given invoice.
operationId: GetSubscriptionInvoicePayment
responses:
'200':
description: Success. Specific payment for the invoice is returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SubscriptionInvoicePayment'
'404':
$ref: '#/components/responses/NotFoundError'
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}:
parameters:
- name: subscription_uuid
in: path
description: The unique identifier of the subscription.
required: true
schema:
$ref: '#/components/schemas/UUID'
- name: invoice_uuid
in: path
description: The unique identifier of the invoice.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
tags:
- Subscriptions
summary: Get subscription invoice
description: Gets a specific invoice for a given subscription.
operationId: GetSubscriptionInvoice
responses:
'200':
description: Success. An invoice is returned.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SubscriptionInvoice'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
components:
schemas:
OfferingPlanResponseAttributes:
allOf:
- $ref: '#/components/schemas/PlanResponseAttributes'
- $ref: '#/components/schemas/OfferingPlanResponseExtraAttributes'
PaymentAuthority:
type: object
oneOf:
- $ref: '#/components/schemas/PaymentAuthorityEPPayments'
- $ref: '#/components/schemas/PaymentAuthorityStripe'
- $ref: '#/components/schemas/PaymentAuthorityAuthorizeNet'
discriminator:
propertyName: type
mapping:
elastic_path_payments_stripe: '#/components/schemas/PaymentAuthorityEPPayments'
stripe_payment_intents: '#/components/schemas/PaymentAuthorityStripe'
authorize_net: '#/components/schemas/PaymentAuthorityAuthorizeNet'
required:
- type
properties:
type:
description: The name of the payment gateway facilitating the secure transmission of payment data.
type: string
example: elastic_path_payments_stripe
enum:
- authorize_net
- elastic_path_payments_stripe
- stripe_payment_intents
x-go-type: paymentgateways.GatewayName
x-go-type-import:
name: paymentgateways
path: gitlab.elasticpath.com/commerce-cloud/subscriptions.svc/internal/paymentgateways
Relationship:
anyOf:
- $ref: '#/components/schemas/SingleRelationship'
- $ref: '#/components/schemas/ManyRelationship'
LeadTime:
type: object
description: Configuration of the lead time to generate an invoice ahead of time in a pro-forma state
properties:
type:
type: string
description: The unit of time that lead time is measured in.
example: day
enum:
- day
- week
x-go-type: model.LeadTimeType
x-go-type-import:
name: model
path: gitlab.elasticpath.com/commerce-cloud/subscriptions.svc/internal/domain/model
time:
type: integer
description: The lead time to generate an invoice ahead of time in a pro-forma state
example: 14
minimum: 1
required:
- type
- time
FeaturePromotion:
required:
- name
- tag
properties:
name:
type: string
description: The name of the feature.
minLength: 3
maxLength: 1024
example: Digital library access
tag:
$ref: '#/components/schemas/FeatureTag'
promotion_id:
$ref: '#/components/schemas/UUID'
OfferingPlanExternalRefMeta:
readOnly: true
type: string
format: string
description: The offerings plan external_ref value
example: 97dddc65-eabd-45d8
# --- truncated at 32 KB (99 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/openapi/elastic-path-subscriptions-api-openapi.yml