Skip to main content
PATCH
cURL

Authorizations

X-Delegated-Token
string
header
required

Headers

X-Tenant-ID
string
required

Unique identifier of the tenant in the system (usually a store identifier)

Path Parameters

subscriptionId
string<uuid>
required

The subscription identifier

Body

application/json
paymentMethod
object
backupPaymentMethod
null | object

The customer's payment method to charge after a renewal payment with the primary payment method is declined; null removes the backup. It must be one of the customer's own payment methods, must not be revoked, must be chargeable automatically and must differ from the primary payment method; otherwise the request fails with 400 and a BACKUP_PAYMENT_METHOD_* code.

deliveryAddress
Address · object
nextBillingDate
customAttributes
object

The complete set of customer-editable custom attributes. REPLACES the current customer-visible attributes: keys present are set, customer-visible keys omitted are removed. Internal (_-prefixed) and reserved keys are always preserved and cannot be written (returns 400); an internal key the shop exposes may be sent back unchanged, as a read returned it. Send {} to clear all customer-visible attributes.

Response

200 - application/json

Default Response

id
string<uuid>
required

Unique subscription identifier (UUID).

Example:

"550e8400-e29b-41d4-a716-446655440000"

resource
enum<string>
required
Available options:
subscription
serial
string
required

Unique serial number that increments sequentially with each new subscription within a store.

Minimum string length: 1
Example:

"1042"

status
enum<string>
required

Subscription lifecycle status. active: billing runs on schedule; paused: billing suspended until resumed; canceled: permanently stopped (can be reactivated); failed: latest billing attempt failed; expired: reached configured end date; merged: consolidated into another subscription.

Available options:
active,
paused,
canceled,
failed,
expired,
merged
Example:

"active"

createdAt
string<date-time>
required

Purchase date of the subscription.

updatedAt
string<date-time>
required

Last update date of the subscription.

canceledAt
null | string<date-time>
required

Cancellation date of the subscription.

nextBillingDate
null | string<date-time>
required

The next billing date determines when the renewal process begins its billing phase. When billing succeeds, it creates one order—or multiple orders for prepaid subscriptions.

Example:

"2024-02-15T10:00:00.000Z"

currentCycle
integer
required

The subscription's billing cycle count. Starts at 0 before the first billing completes, increments by 1 with each successful billing.

Required range: x >= 0
Example:

1

currencyCode
string
required

ISO 4217 currency code that applies to both item prices and delivery price.

Required string length: 3
Example:

"USD"

billingPolicy
object
required

How often and when the subscription is billed.

deliveryPolicy
object
required

How often shipments are dispatched. Usually matches the billing policy.

deliveryMethod
null | object
required
customAttributes
object[]
required

Arbitrary key-value pairs attached to this subscription. In the Customer API, attributes whose key starts with _ are hidden and excluded.

items
SubscriptionItem · object[]
required
Minimum array length: 1
discounts
SubscriptionDiscount · object[]
required
paymentMethod
required

CustomerPaymentMethod id when not expanded, or the full CustomerPaymentMethod object when the field name is included in the expand query parameter. Can be null.

backupPaymentMethod
required

The subscription's backup payment method: after a renewal payment with the primary paymentMethod is declined, the next attempt charges this one. null when the subscription has no backup. CustomerPaymentMethod id when not expanded, or the full CustomerPaymentMethod object when the field name is included in the expand query parameter. Can be null.

deliveryAddress
null | object
required
deliveryPrice
number
required

The base delivery price associated with the selected delivery method.

Required range: x >= 0