Update subscription cancellation

Update a subscription cancellation, used for updating cancellation reason and description.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

Request Body schema: application/json

Patch cancellation resource.

subscriptionId
required
string <= 50 characters

Identifier of the canceled subscription order.

reason
string
Default: "other"

Cancellation reason.

Enum: "did-not-use" "did-not-want" "missing-features" "bugs-or-problems" "do-not-remember" "risk-warning" "contract-expired" "too-expensive" "other" "billing-failure"
description
string <= 255 characters

Cancel reason description in free form.

prorated
boolean
Default: false

Defines if the customer gets a pro-rata credit for the time remaining between churnTime and subscription's next renewal time.

Array of objects

Items to be added to the new invoice. Proration item is generated and added automatically.

Array
type
required
string

Type of line item.

Enum: "debit" "credit"
unitPriceAmount
required
number <double>

Unit price of the line item.

unitPriceCurrency
required
string = 3 characters

ISO 4217 alphabetic currency code.

quantity
required
integer

Quantity of line item.

description
string

Description of line item.

periodStartTime
string <date-time>

Date-time when the period begins for this item.

periodEndTime
string <date-time>

Date-time when the period ends for this item.

Responses
200

Cancellation was updated.

Response Schema: application/json
subscriptionId
required
string <= 50 characters

Identifier of the canceled subscription order.

churnTime
required
string <date-time>

The time when the subscription will be deactivated.

id
string <= 50 characters

Cancellation identifier.

proratedInvoiceId
string <= 50 characters

Identifier of the invoice on which the cancellation proration is calculated.

appliedInvoiceId
string <= 50 characters

The identifier of the invoice where the cancellation fees or credits are applied.

canceledBy
string
Default: "customer"

Who did the cancellation.

Enum: "merchant" "customer"
reason
string
Default: "other"

Cancellation reason.

Enum: "did-not-use" "did-not-want" "missing-features" "bugs-or-problems" "do-not-remember" "risk-warning" "contract-expired" "too-expensive" "other" "billing-failure"
description
string <= 255 characters

Cancel reason description in free form.

prorated
boolean
Default: false

Defines if the customer gets a pro-rata credit for the time remaining between churnTime and subscription's next renewal time.

status
string
Default: "confirmed"

"draft" defines that the cancellation isn't applied on an invoice and subscription but can be inspected to see the charge. "confirmed" will set a subscription to be canceled when the churnTime is reached. "completed" is a read-only status which is set by the system when the churnTime is reached. The cancellation may not be changed or deleted when the status is "completed".

Enum: "draft" "confirmed" "completed" "revoked"
canceledTime
string <date-time>

The cancellation time (when the status is confirmed which is by default unless specified "draft").

createdTime
string <date-time>

The time of resource creation (when it is posted).

Array of objects

Items to be added to the new invoice. Proration item is generated and added automatically.

Array
type
required
string

Type of line item.

Enum: "debit" "credit"
unitPriceAmount
required
number <double>

Unit price of the line item.

unitPriceCurrency
required
string = 3 characters

ISO 4217 alphabetic currency code.

quantity
required
integer

Quantity of line item.

description
string

Description of line item.

periodStartTime
string <date-time>

Date-time when the period begins for this item.

periodEndTime
string <date-time>

Date-time when the period ends for this item.

createdTime
string <date-time>

Date-time when the item was added to the subscription.

lineItemSubtotal
number

Subtotal of the line items which will be added after the subscription's cancellation.

Array of objects (Self) non-empty

The links related to resource.

Array (non-empty)
href
required
string

The link URL.

rel
required
string

The link type.

Value: "self"
401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

patch/subscription-cancellations/{id}
Request samples
application/json
{
  • "subscriptionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "canceledBy": "merchant",
  • "reason": "did-not-use",
  • "description": "string",
  • "prorated": false,
  • "status": "draft",
  • "churnTime": "2019-08-24T14:15:22Z",
  • "lineItems": [
    ]
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "subscriptionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "proratedInvoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "appliedInvoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "canceledBy": "merchant",
  • "reason": "did-not-use",
  • "description": "string",
  • "prorated": false,
  • "status": "draft",
  • "canceledTime": "2019-08-24T14:15:22Z",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "churnTime": "2019-08-24T14:15:22Z",
  • "lineItems": [
    ],
  • "lineItemSubtotal": 49.95,
  • "_links": [
    ]
}