latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Plans

Updates a Plan

Updates the specified Plan.

post/plans/{id}

Path parameters

idstring required

The Plan identifier.

Request body

namestring nullable

Describes the subscription products or services added to this plan.

reminderOffsetDaysinteger nullable

The number of days before the opening of the invoice that the reminder event is triggered.

billingOffsetDaysinteger nullable required

The number of days before the due date that billing is initiated.

collectionPeriodDaysinteger nullable required

Represents the number of days that Digital River attempts to collect payment.

state'draft' | 'active' | 'discontinued' | 'deactivated'

The valid states of a plan. Setting a plan to <code>deactivated</code> causes all connected subscriptions to end with the current period.

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

Example request

{
  "name": "Wireless keyboards",
  "reminderOffsetDays": 7,
  "billingOffsetDays": 4,
  "collectionPeriodDays": 10,
  "state": "active",
  "metadata": {
    "coupon": "iOS"
  }
}

Response

200 OK

updatedTime:string date-time

The time when the Plan was last updated.

liveModeboolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

idstring

The unique identifier of a Plan.

termsstring required

The contractual agreement displayed to the customer during the acquisition process.

contractBindingDaysinteger required

Indicates the agreed upon length of the contract. For example, an annual subscription should have a value of 365.

interval'year' | 'month' | 'week' | 'day' required

The supported billing intervals

intervalCountinteger required

How often the customer is billed per the unit of time specified by <code>interval</code> (e.g. every 3 months).

createdTimestring date-time

The time when the Plan was created.

namestring nullable

Describes the subscription products or services added to this plan.

reminderOffsetDaysinteger nullable

How many days before the opening of the invoice should the reminder event be triggered.

billingOptimizationboolean

Indicates whether billing optimization is activated.

billingOffsetDaysinteger nullable required

The number of days before the opening of the invoice that the reminder event is triggered.

collectionPeriodDaysinteger nullable required

Represents the number of days that Digital River attempts to collect payment.

state'draft' | 'active' | 'discontinued' | 'deactivated'

The valid states of a plan. Setting a plan to <code>deactivated</code> causes all connected subscriptions to end with the current period.

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

Example response

{
  "stateTransitions": {
    "activated": "2018-04-25T20:36:00Z",
    "discontinued": "2018-04-25T20:36:00Z",
    "deactivated": "2018-04-25T20:36:00Z"
  },
  "updatedTime:": "2021-06-02T13:15:09.7347766Z",
  "liveMode": true,
  "id": "4a1a1fdd-2f7b-4a4e-92d2-2e843f06e82a",
  "terms": "These are the terms...",
  "contractBindingDays": 365,
  "interval": "month",
  "intervalCount": 1,
  "name": "Wireless keyboards",
  "reminderOffsetDays": 7,
  "billingOptimization": true,
  "billingOffsetDays": 4,
  "collectionPeriodDays": 10,
  "state": "active",
  "metadata": {
    "coupon": "iOS"
  }
}