Updates a plan in an offering
PUT/subscriptions/offerings/:offering_uuid/plans/:plan_uuid
Updates a plan in an offering
Request
Path Parameters
The unique identifier of the offering.
The unique identifier of the plan.
- application/json
Body
data OfferingPlanUpdaterequired
The unique identifier.
Possible values: [subscription_offering_plan]
attributes PlanUpdateAttributesrequired
Possible values: <= 2048 characters
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Possible values: >= 3 characters and <= 1024 characters
Possible values: <= 1024 characters
The plan description to display to customers.
Possible values: [day, week, month, year]
The unit of time in which billing intervals are measured.
Possible values: >= 1
The number of intervals between issuing bills.
The number of intervals from the start of the subscription before billing starts. Used with billing_interval_type. For example, if billing_interval_type is months, and trial_period is 1, the trial period is 1 month.
Possible values: >= 1
The length of time for which a subscription plan is valid. For example, six months after which the plan is renewed.
Possible values: [close, roll]
Enables you to specify recurring payments. If end_behavior is roll, customers pay regularly and repeatedly. If end_behavior is close, customers pay a total amount in a limited number of partial payments.
The subscriber can pause a subscription.
The subscriber can resume a paused subscription.
The subscriber can cancel a subscription.
Possible values: <= 100
A percentage discount on the total cost of any products within an offering. For example, you can configure a percentage that equates the cost of a plan to the total value of all products within the offering, reduced by a percentage. For example, if you specify 10, a 10% discount is applied to the total value of all repeat products in an offering.
fixed_price objectnullable
property name* objectnullable
The value as a whole number of the currency's smallest subdivision.
Whether the amount includes any taxes.
Responses
- 200
- 400
- 403
- 404
- 409
- 500
Success. The plan details are updated on the offering.
- application/json
- Schema
- Example (from schema)
Schema
data OfferingPlan
The unique identifier.
Possible values: [subscription_offering_plan]
attributes PlanAttributesrequired
Possible values: <= 2048 characters
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Possible values: >= 3 characters and <= 1024 characters
A name for the plan.
Possible values: <= 1024 characters
The plan description to display to customers.
Possible values: [day, week, month, year]
The unit of time that billing intervals are measured.
Possible values: >= 1
The number of intervals between issuing bills.
The number of intervals from the start of the subscription before billing starts. Used with billing_interval_type. For example, if billing_interval_type is months, and trial_period is 1, the trial period is 1 month.
Possible values: >= 1
The number of intervals that the subscription runs for.
Possible values: [close, roll]
Enables you to specify recurring payments. If end_behavior is roll, customers pay regularly and repeatedly. If end_behavior is close, customers pay a total amount in a limited number of partial payments.
The subscriber can pause a subscription.
The subscriber can resume a paused subscription.
The subscriber can cancel a subscription.
Possible values: <= 100
A percentage discount on the total cost of any products within an offering. For example, you can configure a percentage that equates the cost of a plan to the total value of all products within the offering, reduced by a percentage. For example, if you specify 10, a 10% discount is applied to the total value of all repeat products in an offering.
fixed_price Price
property name* object
The base price.
The value as a whole number of the currency's smallest subdivision.
Indicates whether the amount includes any taxes.
The date and time a resource was updated.
The date and time a resource was created.
relationships Relationships
Relationships are established between different subscription entities. For example, a product and a plan are related to an offering, as both are attached to it.
meta OfferingPlanMetarequired
price Price
property name* object
The base price.
The value as a whole number of the currency's smallest subdivision.
Indicates whether the amount includes any taxes.
display_price DisplayPrice
without_tax PriceFormatting
The unformatted amount for the objects.
The three-letter ISO currency code in uppercase, associated with a price.
The formatted amount for the objects.
with_tax PriceFormatting
The unformatted amount for the objects.
The three-letter ISO currency code in uppercase, associated with a price.
The formatted amount for the objects.
Whether a plan is active on a subscription using that offering. The active_plan attribute is null if a plan is not active in a subscription.
The owner of a resource, either store or organization.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "subscription_offering_plan",
    "attributes": {
      "external_ref": "abc123",
      "name": "Monthly",
      "description": "A monthly subscription.",
      "billing_interval_type": "month",
      "billing_frequency": 1,
      "trial_period": 7,
      "plan_length": 12,
      "end_behavior": "close",
      "can_pause": false,
      "can_resume": false,
      "can_cancel": false,
      "base_price_percentage": 90,
      "fixed_price": {
        "USD": {
          "amount": 100,
          "includes_tax": false
        },
        "GBP": {
          "amount": 90,
          "includes_tax": true
        }
      },
      "updated_at": "2017-01-10T11:41:19.244842Z",
      "created_at": "2017-01-10T11:41:19.244842Z"
    },
    "relationships": {
      "plans": {
        "links": {
          "related": "/offerings/:offering-id/plans",
          "self": "/offerings/:offering-id"
        },
        "data": {
          "type": "offering-plan",
          "id": "625fe958-7b4b-40a0-a2c0-dbb8f31eec0d"
        }
      }
    },
    "meta": {
      "price": {
        "USD": {
          "amount": 100,
          "includes_tax": false
        },
        "GBP": {
          "amount": 90,
          "includes_tax": true
        }
      },
      "display_price": {
        "without_tax": {
          "amount": 100,
          "currency": "USD",
          "formatted": "$1.00"
        },
        "with_tax": {
          "amount": 110,
          "currency": "USD",
          "formatted": "$1.10"
        }
      },
      "active_plan": true,
      "owner": "store",
      "timestamps": {
        "updated_at": "2017-01-10T11:41:19.244842Z",
        "created_at": "2017-01-10T11:41:19.244842Z"
      }
    }
  }
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": 500,
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Validation Error",
      "status": "400",
      "detail": "data.attributes.name: \"name\" is required"
    }
  ]
}
Forbidden. The operation is forbidden on this entity.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": 500,
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Permission denied",
      "status": "404",
      "detail": "Permission denied: plan tenancy mismatch"
    }
  ]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": 500,
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Not Found",
      "status": "404",
      "detail": "No plan found"
    }
  ]
}
Write conflict. Unable to perform the operation at this time.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": 500,
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Write Conflict",
      "status": "409"
    }
  ]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": 500,
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Internal Server Error",
      "status": "500"
    }
  ]
}