GET
/
v2
/
subscriptions
/
{id}
/
phases
/
{phaseId}
curl --request GET \
  --url https://api.hyperline.co/v2/subscriptions/{id}/phases/{phaseId} \
  --header 'Authorization: Bearer <token>'
{
  "id": "sup_1FoLfIQ5VOMbXf",
  "type": "standard",
  "status": "active",
  "order": 0,
  "activation_strategy": "manual",
  "end_strategy": "duration",
  "duration": {
    "count": 1,
    "period": "years"
  },
  "billing_date_setting": "phase_start",
  "initial_billing_at": "2024-10-13T02:00:00.000Z",
  "starts_at": "2024-10-13T02:00:00.000Z",
  "ends_at": "2024-10-13T02:00:00.000Z",
  "transition_calculation_method": "prorata",
  "transition_invoicing_schedule": "immediately",
  "products": [
    {
      "id": "itm_FJKlqUb8COXw55",
      "name": "Product name",
      "description": "A description of the product.",
      "description_display_interval_dates": true,
      "attached_at": "2024-01-15T00:00:00Z",
      "detached_at": "2024-04-15T00:00:00Z",
      "current_period_started_at": "2024-01-15T00:00:00Z",
      "current_period_ends_at": "2024-02-15T00:00:00Z",
      "next_payment_at": "2024-02-15T00:00:00Z",
      "payment_interval": {
        "period": "months",
        "count": 1
      },
      "payment_schedule": "start",
      "type": "flat_fee",
      "count": 1,
      "prices": [
        {
          "type": "fee",
          "id": "<string>",
          "amount": 24000
        }
      ]
    }
  ],
  "coupons": [
    {
      "description": "<string>",
      "created_at": "2024-12-20T16:04:11Z",
      "type": "amount",
      "discount_amount": 2000,
      "currency": "EUR",
      "id": "cou_DKL4Xcb5VSa8CQ",
      "name": "Partner discount",
      "subscription_coupon_id": "coos_d9pVekhjoGppuX",
      "repeat": "forever",
      "product_ids": [
        "itm_FJKlqUb8COXw55"
      ],
      "apply_at": "2024-10-13T02:00:00.000Z",
      "expires_at": "2024-10-13T02:00:00.000Z"
    }
  ],
  "created_at": "2024-10-12T07:00:01.860Z",
  "updated_at": "2024-10-12T07:00:01.860Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required
phaseId
string
required

Response

200
application/json
id
string
required

Subscription phase ID.

type
enum<string>
required

Type of subscription phase.

  • setup: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
  • trial: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
  • standard: The phase represents a standard recurring billing.
Available options:
setup,
trial,
standard
status
enum<string>
required

Status of subscription phase.

  • pending: The phase is waiting to start (not started yet).
  • active: The phase is currently in progress.
  • finished: The phase has ended and is complete.
Available options:
pending,
active,
finished
order
number
required

Order in which the phase is executed within all subscription phases.

activation_strategy
enum<string>
required

Activation strategy of subscription phase.

  • immediately: The phase starts as soon as the subscription is activated.
  • manual: The phase starts when a user manually activates it.
  • start_date: The phase starts on a specified date.
  • quote_signature: The phase starts when the subscription quote is signed.
  • checkout: The phase starts when the subscription checkout is completed.
  • contract_start_date: The phase starts on the start date of the related subscription contract.
  • previous_phase_end: The phase starts when the previous phase ends.
Available options:
immediately,
manual,
start_date,
quote_signature,
checkout,
contract_start_date,
previous_phase_end
end_strategy
enum<string>
required

End strategy of subscription phase.

  • manual: The phase ends when a user manually stops it.
  • end_date: The phase ends on a specified date.
  • duration: The phase ends after a specific relative duration.
  • contract_end_date: The phase ends on the end date of the related subscription contract.
Available options:
manual,
end_date,
duration,
contract_end_date
duration
object | null
required

Interval over which the subscription phase spans. Only applies to duration end strategy.

billing_date_setting
enum<string>
required

Represents when the first billing date occurs.

  • phase_start: Aligns with the start of the phase.
  • specific_date: Occurs on a specified date.
Available options:
phase_start,
specific_date
initial_billing_at
string | null
required

Date when the subscription phase will start being billed. Only applies to specific_date billing date setting. UTC date time string in the ISO 8601 format.

starts_at
string | null
required

Actual start date of the phase. UTC date time string in the ISO 8601 format.

ends_at
string | null
required

Actual end date of the phase. UTC date time string in the ISO 8601 format.

transition_calculation_method
enum<string>
required

Calculation method used when transitioning from one phase to the next one.

  • prorata: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
  • pay_in_full: The full amount for the phase billing period must be paid.
  • none: No amount will need to be paid, phase will simply transition from one to the next.
Available options:
prorata,
pay_in_full,
none
transition_invoicing_schedule
enum<string>
required

Represents when the transition amount will be invoiced.

  • immediately: An invoice will be generated immediately with the corresponding amount.
Available options:
immediately
products
object[]
required

Products comprising the subscription phase.

coupons
object[]
required

Coupons comprising the subscription phase.

created_at
string
required

Subscription phase creation date. UTC date time string in the ISO 8601 format.

updated_at
string
required

Subscription phase last edition date. UTC date time string in the ISO 8601 format.