POST
/
subscriptions
/
{id}
/
pause
Pause a subscription
curl --request POST \
  --url https://api.cloud.flexprice.io/v1/subscriptions/{id}/pause \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "dry_run": true,
  "metadata": {},
  "pause_days": 123,
  "pause_end": "<string>",
  "pause_mode": "immediate",
  "pause_start": "<string>",
  "reason": "<string>"
}'
{
  "created_at": "<string>",
  "created_by": "<string>",
  "environment_id": "<string>",
  "id": "<string>",
  "metadata": {},
  "original_period_end": "<string>",
  "original_period_start": "<string>",
  "pause_end": "<string>",
  "pause_mode": "immediate",
  "pause_start": "<string>",
  "pause_status": "none",
  "reason": "<string>",
  "resume_mode": "immediate",
  "resumed_at": "<string>",
  "status": "published",
  "subscription_id": "<string>",
  "tenant_id": "<string>",
  "updated_at": "<string>",
  "updated_by": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Path Parameters

id
string
required

Subscription ID

Body

application/json

Pause subscription request

Request object for pausing an active subscription with various pause modes and options

pause_mode
enum<string>
required
Available options:
immediate,
scheduled,
period_end
dry_run
boolean

Whether to perform a dry run @Description If true, validates the request and shows impact without actually pausing the subscription @Example false

metadata
object

Additional metadata as key-value pairs @Description Optional metadata for storing additional information about the pause @Example {"requested_by": "customer", "channel": "support_ticket"}

pause_days
integer

Duration of the pause in days @Description Number of days to pause the subscription. Cannot be used together with pause_end. Must be greater than 0 @Example 30

pause_end
string

End date for the subscription pause @Description ISO 8601 timestamp when the pause should end. Cannot be used together with pause_days. Must be after pause_start @Example "2024-02-15T00:00:00Z"

pause_start
string

Start date for the subscription pause @Description ISO 8601 timestamp when the pause should begin. Required when pause_mode is "scheduled" @Example "2024-01-15T00:00:00Z"

reason
string

Reason for pausing the subscription @Description Optional reason for the pause. Maximum 255 characters @Example "Customer requested temporary suspension"

Maximum length: 255

Response

OK

Response object containing subscription pause information

created_at
string
created_by
string
environment_id
string

EnvironmentID is the environment identifier for the pause

id
string

ID is the unique identifier for the subscription pause

metadata
object
original_period_end
string

OriginalPeriodEnd is the end of the billing period when the pause was created

original_period_start
string

OriginalPeriodStart is the start of the billing period when the pause was created

pause_end
string

PauseEnd is when the pause will end (null for indefinite)

pause_mode
enum<string>
Available options:
immediate,
scheduled,
period_end
pause_start
string

PauseStart is when the pause actually started

pause_status
enum<string>
Available options:
none,
active,
scheduled,
completed,
cancelled
reason
string

Reason is the reason for pausing

resume_mode
enum<string>
Available options:
immediate,
scheduled,
auto
resumed_at
string

ResumedAt is when the pause was actually ended (if manually resumed)

status
enum<string>
Available options:
published,
deleted,
archived
subscription_id
string

SubscriptionID is the identifier for the subscription

tenant_id
string
updated_at
string
updated_by
string