POST
/
v1
/
subscriptions
/
{id}
/
cancel
curl --request POST \
  --url https://api.hyperline.co/v1/subscriptions/{id}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cancel_at": "2023-01-20T16:04:11Z",
  "pro_rata": true
}'
{
  "id": "<string>",
  "cancel_at": "2023-01-20T16:04:11Z",
  "created_at": "2023-01-20T16:04:11Z",
  "current_period_ends_at": "2023-01-20T16:04:11Z",
  "current_period_started_at": "2023-01-20T16:04:11Z",
  "next_payment_at": "2023-01-20T16:04:11Z",
  "paused_at": "2023-01-20T16:04:11Z",
  "renews_at": "2023-01-20T16:04:11Z",
  "starts_at": "2023-01-20T16:04:11Z",
  "trial_ends_at": "2023-01-20T16:04:11Z",
  "purchase_order": "<string>",
  "updated_at": "2023-01-20T16:04:11Z",
  "billing_plan_id": "<string>",
  "billing_scenario_id": "<string>",
  "checkout_session_id": "<string>",
  "customer_id": "<string>",
  "last_invoice_id": "<string>",
  "currency": "EUR",
  "interval": "weekly",
  "invoice_schedule": "period_start",
  "start_automatically": true,
  "status": "active"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
cancel_at
string

UTC date time string in the ISO 8601 format.

pro_rata
boolean

Response

200 - application/json
id
string
required
cancel_at
string | null
required

UTC date time string in the ISO 8601 format.

created_at
string
required

UTC date time string in the ISO 8601 format.

current_period_ends_at
string | null
required

UTC date time string in the ISO 8601 format.

current_period_started_at
string | null
required

UTC date time string in the ISO 8601 format.

next_payment_at
string | null
required

UTC date time string in the ISO 8601 format.

paused_at
string | null
required

UTC date time string in the ISO 8601 format.

renews_at
string | null
required

UTC date time string in the ISO 8601 format.

starts_at
string | null
required

UTC date time string in the ISO 8601 format.

trial_ends_at
string | null
required

UTC date time string in the ISO 8601 format.

purchase_order
string | null
required
updated_at
string
required

UTC date time string in the ISO 8601 format.

billing_plan_id
string | null
required
billing_scenario_id
string | null
required
checkout_session_id
string | null
required
customer_id
string
required
last_invoice_id
string | null
required
currency
string
required

Currency code. See ISO 4217.

interval
enum<string> | null
required
Available options:
weekly,
monthly,
quarterly,
yearly,
once
invoice_schedule
enum<string> | null
required
Available options:
period_start,
period_end
start_automatically
boolean
required
status
enum<string>
required
Available options:
active,
cancelled,
draft,
errored,
paused,
pending,
trialing,
voided