v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Subscriptions

PauseSubscription

Schedules a PAUSE action to pause an active subscription.

post/v2/subscriptions/{subscription_id}/pause

Path parameters

subscription_idstring required

The ID of the subscription to pause.

Request body

pause_effective_datestring nullable

The YYYY-MM-DD-formatted date when the scheduled PAUSE action takes place on the subscription.

When this date is unspecified or falls within the current billing cycle, the subscription is paused on the starting date of the next billing cycle.

pause_cycle_durationinteger nullable

The number of billing cycles the subscription will be paused before it is reactivated.

When this is set, a RESUME action is also scheduled to take place on the subscription at the end of the specified pause cycle duration. In this case, neither resume_effective_date nor resume_change_timing may be specified.

resume_effective_datestring nullable

The date when the subscription is reactivated by a scheduled RESUME action. This date must be at least one billing cycle ahead of pause_effective_date.

resume_change_timing'IMMEDIATE' | 'END_OF_BILLING_CYCLE'

Supported timings when a pending change, as an action, takes place to a subscription.

pause_reasonstring nullable

The user-provided reason to pause the subscription.

Response

Success

Example response

{
  "actions": [
    {
      "effective_date": "2023-11-17",
      "id": "99b2439e-63f7-3ad5-95f7-ab2447a80673",
      "type": "PAUSE"
    }
  ],
  "subscription": {
    "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB",
    "created_at": "2023-06-20T21:53:10Z",
    "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
    "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f",
    "location_id": "S8GWD5R9QB376",
    "phases": [
      {
        "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY",
        "ordinal": 0,
        "plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP",
        "uid": "873451e0-745b-4e87-ab0b-c574933fe616"
      }
    ],
    "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H",
    "source": {
      "name": "My Application"
    },
    "start_date": "2023-06-20",
    "status": "ACTIVE",
    "timezone": "America/Los_Angeles",
    "version": 1
  }
}