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 Proration Policies API

Proration is the adjustment of charges or credits on a subscriber's account based on the amount of time a service is used. Proration ensures that subscribers are only charged for the actual time they use the service, whether they upgrade, downgrade, start, or cancel their subscription partway through a billing cycle. This means fair billing for your subscribers and provides you with the flexibility to change your subscribers subscriptions at any time. ::: noteSubscriptions use client credentials to enable changes to subscriptions, so if you want your shoppers to have the ability to make changes, you can implement a BFF layer using this approach.:::Proration occurs for:- Pricing option upgrades/downgrades: If a subscriber changes their pricing option in the middle of a billing cycle, proration adjusts the charges to reflect the time spent on each pricing option.- Service cancellation: If a subscriber cancels a subscription before the end of a billing cycle, they may receive a prorated invoice for the used portion of the subscription.- Mid-cycle subscription: If a subscriber starts a subscription in the middle of a billing cycle, they are charged a prorated amount for the remaining days in the billing cycle.There are several scenarios when implementing proration policies.1. You may want one policy for multiple offerings because only some subscriptions need prorating.2. You may want a default proration policy for your store.3. You may want several policies for different offerings. In Subscriptions, charges only prorate by day. As soon as a subscriber changes their subscription, a manual billing run is triggered and an invoice is generated with the new price on the next billing run and the difference in price is prorated over days. By default, proration is not enabled for Subscriptions. Once you have attached a proration policy to an offering, proration is enabled automatically.### End dates when switching pricing optionsSubscriptions manages the subscription end date when shoppers switch from one pricing option to another. Whether or not an end date is configured depends on the end behavior of the pricing options you are switching between.| Current Subscription | New Subscription | Proration Behavior | End date || --- | --- | --- | --- || `close` | `roll` | The subscription switches from a pricing option with a fixed end date to a rolling pricing option so no end date is set after proration. | No end date is configured. || `roll` | `close` | The subscription switches to a fixed pricing option, and the end date is configured based on the duration of the pricing option. | An end date is configured. || `close` | `close` | The remaining time on the current pricing option is not carried over to the new pricing option. For example, if your current pricing option has 3 months remaining and you switch to a new pricing option that has a fixed length of 6 months, the new end date is calculated as 6 months from the day you switch pricing options, effectively resetting the subscription length to the new pricing option. | New end date calculated from the day you switched pricing option. |

Elastic Path Proration Policies 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 Proration Policies. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 5 operations across 2 paths, and defines 19 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.

5 operations 2 paths 19 schemas 1 DELETE2 GET1 POST1 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 Proration Policies API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerToken). By default, every request must be authenticated.

Paths & Operations 5

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

Proration Policies 5

Proration is the adjustment of charges or credits on a subscriber's account based on the amount of time a service is used. Proration ensures that subscribers are only charged for…

POST
/v2/subscriptions/proration-policies
Create a Proration Policy
CreateProrationPolicy body → 201400500
GET
/v2/subscriptions/proration-policies
List proration policies
ListProrationPolicies 2 params → 200400500
GET
/v2/subscriptions/proration-policies/{proration_policy_uuid}
Get proration policy
GetProrationPolicy 1 param → 200400404500
PUT
/v2/subscriptions/proration-policies/{proration_policy_uuid}
Update proration policy
UpdateProrationPolicy 1 param body → 200400403404409
DELETE
/v2/subscriptions/proration-policies/{proration_policy_uuid}
Delete proration policy
DeleteProrationPolicy 1 param → 204400500

Schemas 19

The contract defines 19 schemas that model the data the API accepts and returns. The most detailed are ProrationPolicy (4 properties), Error (4 properties), LinkObject (3 properties), ProrationPolicyAttributes (3 properties). Each schema is shown below with its type and property counts.

ProrationPolicyType
string
ProrationPolicyResponseAttributes
Timestamps
object
2 properties 2 required
Link
Error
object
4 properties 2 required
ErrorResponse
object
1 property 1 required
Links
object
ProrationPolicyMeta
object
2 properties 2 required
LinkObject
object
3 properties
ProrationPolicyUpdate
object
3 properties 3 required
ProrationPolicy
object
4 properties 3 required
ProrationPolicyUpdateAttributes
object
3 properties
UUID
string
The unique identifier.
LinkURI
string
OwnerMeta
string
The owner of a resource, either store or organization.
ExternalRefUpdate
string
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
ProrationPolicyCreate
object
2 properties 2 required
ProrationPolicyAttributes
object
3 properties 2 required
ExternalRef
string
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-proration-policies-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