Passer au contenu principal
POST
/
v2
/
subscriptions
/
transitions
/
{id}
/
cancel
Cancel subscription transition
curl --request POST \
  --url https://api.hyperline.co/v2/subscriptions/transitions/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "customer_id": "<string>",
  "base_subscription_id": "<string>",
  "source_subscription_id": "<string>",
  "target_subscription_id": "<string>",
  "transitioned_at": "2023-12-25",
  "name": "<string>",
  "transition_date": "2023-12-25"
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

Réponse

id
string
requis

The unique identifier of the subscription transition

customer_id
string
requis

The ID of the customer associated with the transition

base_subscription_id
string
requis

The ID of the original subscription from which this transition is derived. It references the last active version of the subscription.

source_subscription_id
string
requis

The ID of the subscription to transition from

target_subscription_id
string | null
requis

The ID of the subscription to transition to

status
enum<string>
requis

The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'.

Options disponibles:
scheduled,
completed,
failed,
draft,
cancelled,
pending_quote_signature
transitioned_at
string<date> | null
requis

The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the ISO 8601 format.

name
string | null
requis

An optional name for the transition

transition_date
string<date> | null
requis

The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the ISO 8601 format.

application_schedule
enum<string>
requis

When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately.

Options disponibles:
immediately,
scheduled,
next_renewal,
last_renewal,
quote_signature,
scheduled_after_quote_signature
billing_cycle_transition_method
enum<string> | null
requis

The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date.

Options disponibles:
keep_current_billing_cycle,
align_to_new_billing_cycle
calculation_method
enum<string> | null
requis

The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'refund_and_reinvoice' (only available with application_schedule 'last_renewal') issues a credit note for what was invoiced for the current period and a separate invoice for the new configuration.

Options disponibles:
do_not_charge,
pro_rata,
refund_and_reinvoice