Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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 LifecycleThe 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. :::cautionAlthough, 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 subscriptionsA 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`.### OrdersWhen 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).

Elastic Path Subscriptions API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Subscriptions. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 19 operations across 14 paths, and defines 117 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.

Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.

19 operations 14 paths 117 schemas 1 DELETE14 GET2 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
25.1126.6886238
Base URL
https://useast.api.elasticpath.com
Authentication
HTTP Bearer
License
Resource Areas
1

Authentication & Security 1

Elastic Path Subscriptions API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerToken). By default, every request must be authenticated.

Paths & Operations 19

Across 14 paths, the API surfaces 19 operations — 1 DELETE, 14 GET, 2 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Subscriptions 19

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…

POST
/v2/subscriptions/subscriptions
Create a subscription
CreateSubscription 1 param body → 201400500
GET
/v2/subscriptions/subscriptions
List subscriptions
ListSubscriptions 4 params → 200400500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}
Get subscription
GetSubscription 2 params → 200400404500
PUT
/v2/subscriptions/subscriptions/{subscription_uuid}
Update a subscription
UpdateSubscription 1 param body → 200400403404500
DELETE
/v2/subscriptions/subscriptions/{subscription_uuid}
Delete a subscription
DeleteSubscription 1 param → 204400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/features/{feature_uuid}
Get a feature in a subscription
GetSubscriptionFeature 2 params → 200400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/plans/{plan_uuid}
Get a plan in a subscription
GetSubscriptionPlan 2 params → 200400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options/{pricing_option_uuid}
Get a pricing option in a subscription
GetSubscriptionPricingOption 2 params → 200400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/features
List an subscriptions features
ListSubscriptionFeatures 3 params → 200404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/plans
List subscription plans
ListSubscriptionPlans 1 param → 200400404500
PUT
/v2/subscriptions/subscriptions/{subscription_uuid}/plans
Manage subscription plans
ManageSubscriptionPlans 1 param body → 204400403404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options
List subscription pricing options
ListSubscriptionPricingOptions 1 param → 200400404500
POST
/v2/subscriptions/subscriptions/{subscription_uuid}/states
Create a subscription state
CreateSubscriptionState 1 param body → 204400403404422500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/states
List subscription states
ListSubscriptionStates 1 param → 200400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/states/{state_uuid}
Get subscription state
GetSubscriptionState 2 params → 200400404500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices
List subscription invoices
ListSubscriptionInvoices 3 params → 200500
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments
List subscription invoice payments
ListSubscriptionInvoicePayments 4 params → 200
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments/{payment_uuid}
Get subscription invoice payment
GetSubscriptionInvoicePayment 3 params → 200404
GET
/v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}
Get subscription invoice
GetSubscriptionInvoice 2 params → 200404500

Schemas 117

The contract defines 117 schemas that model the data the API accepts and returns. The most detailed are BuildSubscription (26 properties), PricingOptionAttributes (15 properties), SubscriptionMeta (14 properties), SubscriptionInvoiceAttributes (12 properties). Each schema is shown below with its type and property counts.

FeatureConfigUsageAttributes
object
Configures a usage feature against a plan in an offering, indicating that the referenced feature is a benefit of that plan. The default value that the usage me…
2 properties 2 required
PlanResponseAttributes
Timestamps
object
2 properties 2 required
FeatureResponseAttributes
SubscriptionInvoice
object
5 properties 3 required
Link
SingleCurrencyPrice
object
A price in a single currency.
3 properties 2 required
Relationship
SubscriptionOfferingPlanType
string
FeatureAttributes
object
4 properties 2 required
ProrationEvent
object
5 properties 5 required
PricingOptionAttributes
object
15 properties 8 required
PaymentAuthorityEPPayments
object
3 properties 1 required
SubscriptionType
string
BuildSubscriptionOrder
object
A subscription may optionally be associated with an item in an order by supplying both the order ID and the ID of the item within that order.
2 properties 2 required
PlanMeta
object
5 properties 2 required
Offering
object
5 properties 3 required
FeaturePromotionAttributes
object
2 properties 2 required
ActivePlan
boolean
Whether a plan is active on a subscription using that offering. The activeplan attribute is null if a plan is not active in a subscription.
Relationships
Relationships are established between different subscription entities. For example, a plan and a pricing option are related to an offering, as both are attache…
OfferingBuildPlanPricingOptions
array
PriceFormatting
object
3 properties 3 required
SubscriptionIncludes
object
2 properties
SubscriptionUpdateAttributes
object
5 properties
SelectedMeta
object
1 property
RelationshipLinks
object
Links are used to allow you, as an API consumer, to move between requests. Single entities use a self parameter with a link to that specific resource. Sometime…
1 property
ChangeState
object
2 properties 2 required
SubscriptionPriceUpdateHistoryEntry
object
A record of the previous prices of a subscription before a price change was applied
2 properties 2 required
PaymentAuthorityStripe
object
3 properties 1 required
ManualPayments
boolean
When configured to true, no payment gateway is used and a pending payment is created. See [External Payments](/docs/api/subscriptions/invoicesexternal-payments…
TimePeriod
object
A period of time between a start and end point.
2 properties 2 required
SubscriptionUpdate
object
3 properties 3 required
PlanAttributesAndSelectedMeta
Price
OfferingMeta
object
3 properties 3 required
SelectedMetaAttributes
object
1 property
StateMeta
object
1 property 1 required
OfferingPlanExternalRefMeta
string
The offerings plan externalref value
LeadTime
object
Configuration of the lead time to generate an invoice ahead of time in a pro-forma state
2 properties 2 required
FeaturePlanConfiguration
object
1 property 1 required
SubscriptionPriceChanges
object
2 properties
PaymentFailureDetail
object
The reason the payment failed.
1 property
SubscriptionStateAction
string
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 foll…
CreatePaymentAuthority
object
1 property 1 required
PriceUnits
object
The timeframe during which the plan price is applicable. For example, for a streaming service, the price is $12.99 and the unit is months and the amount is 1.…
2 properties 2 required
FeatureMeta
object
2 properties 2 required
ManageSubscriptionPlans
object
2 properties 2 required
CreatePaymentAuthorityStripe
object
3 properties 3 required
DisplayPrice
object
3 properties
FeatureUsageAttributes
object
4 properties 4 required
SubscriptionOfferingPricingOptionType
string
CreatePaymentAuthorityAuthorizeNet
object
3 properties 3 required
InvoicePaymentTimestamps
ExternalRef
string
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
OfferingPlanResponseExtraAttributes
object
1 property 1 required
OfferingPricingOptionPrices
object
The price of each plan within the offering that this pricing option may be applied to.
TaxItem
object
5 properties 2 required
SubscriptionState
object
4 properties 3 required
SubscriptionOfferingType
string
Error
object
4 properties 2 required
ErrorResponse
object
1 property 1 required
FeaturePromotion
object
3 properties 2 required
OfferingPlanPrices
object
A list of plan prices for each of its pricing options.
PaymentAuthority
object
1 property 1 required
CurrencyIdentifier
string
The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in uppercase.
FeatureConfiguration
object
1 property 1 required
LinkObject
object
3 properties
PricingOptionAttributesAndSelectedMeta
SubscriptionInvoiceItem
object
5 properties 2 required
SubscriptionInvoiceAttributes
object
12 properties 7 required
OfferingPlan
object
5 properties 3 required
SingleRelationship
object
The subscription resource that is related.
2 properties
BuildSubscription
object
26 properties 5 required
UUID
string
The unique identifier.
LinkURI
string
SubscriptionInvoicePaymentAttributes
object
6 properties 3 required
PlanAttributes
object
7 properties 1 required
SubscriptionTimestamps
InvoiceNotification
object
A notification scheduled for an invoice.
3 properties 2 required
SubscriptionOfferingFeatureType
string
SubscriptionAttributes
object
8 properties 7 required
OfferingResponseAttributes
FeatureTag
string
A tag to add to the customer's account when entitled to the feature.
OfferingBuildPlanFeatures
object
A map of configurations indicating which features are available for the plan
Subscription
object
5 properties 3 required
SubscriptionStateType
string
This represents the type of resource object being returned. Always subscriptionstate.
OfferingPricingOption
object
5 properties 3 required
SubscriptionMeta
object
14 properties 11 required
OfferingBuildConfiguredFeatures
object
Map of feature configurations keyed by plan UUID or externalref
PaymentAuthorityAuthorizeNet
object
3 properties 1 required
ManyRelationship
object
The list of resources that are related.
2 properties
SubscriptionInvoicePaymentMeta
object
6 properties 6 required
ActivePricingOption
boolean
Whether a pricing option is active on a subscription using that offering. The activepricingoption attribute is null if a pricing option is not active in a subs…
FeatureAccessAttributes
object
2 properties 2 required
FeatureConfigPromotionAttributes
object
Configures a promotion feature against a plan in an offering, indicating that the referenced feature is a benefit of that plan. The tag of the specific promoti…
2 properties 2 required
SubscriptionInvoicePaymentType
string
This represents the type of resource object being returned. Always subscriptioninvoicepayment.
Links
object
OfferingPricingOptionMeta
object
6 properties 2 required
OfferingAttributes
object
3 properties 1 required
RelationshipData
object
2 properties 2 required
FeatureConfigAccessAttributes
object
Configures an access feature against a plan in an offering, indicating that the referenced feature is a benefit of that plan.
1 property 1 required
OfferingFeature
object
5 properties 3 required
PricingOptionPrice
object
2 properties
NotificationSchedule
object
3 properties 3 required
InvoiceTimestamps
Status
string
The status of a subscription, either active or inactive.
OfferingPlanPriceForPricingOption
object
2 properties
SubscriptionInvoiceType
string
This represents the type of resource object being returned. Always subscriptioninvoice.
OwnerMeta
string
The owner of a resource, either store or organization.
CreatePaymentAuthorityEPPayments
object
3 properties 3 required
SubscriptionInvoiceMeta
object
9 properties 5 required
OfferingPricingOptionPriceForPlan
object
2 properties
SubscriptionInvoicePayment
object
4 properties 4 required
PricingOptionResponseAttributes
OfferingPlanResponseAttributes
OfferingBuildPricingOptionAssociations
object
A map of plans keyed by plan UUID or externalref to a list of associated pricing options, similarly keyed.
SubscriptionStateAttributes
object
2 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-subscriptions-api-openapi.yml Raw ↑

Other APIs Elastic Path publishes across the network.

Elastic Path GraphQL API
Elastic Path Account Addresses API
Elastic Path Account Authentication Settings API
Elastic Path Account Cart Associations API
Elastic Path Account Management Authentication API
Elastic Path Account Members API
Elastic Path Account Membership API
Elastic Path Account Membership Settings API
Elastic Path Account Tags API
Elastic Path Accounts API
Elastic Path Administrator Latest Releases Catalog API API
Elastic Path Application Keys API