API documentation
Integrations
Analytics
Billable events
Companies
Custom properties
Customers
Customers > Credits
Customers > Payment methods
Integrations
Invoices
Invoicing entities
Organisations
Payments
Price configurations
Quotes
Subscriptions
- GETGet subscriptions
- GETGet subscription
- GETGet subscription phases
- GETGet subscription phase
- POSTCreate subscription update
- POSTCreate subscription updates
- POSTCreate subscription
- PUTUpdate subscription
- POSTActivate subscription
- POSTCancel subscription
- POSTPause subscription
- POSTReactivate subscription
- POSTRefresh seat products
- POSTRefresh subscriptions
- POSTReinstate subscription
- POSTTransition subscription to next phase
Third-party apps
Wallets
Get subscription phases
Retrieve the details of the phases for an existing subscription.
curl --request GET \
--url https://api.hyperline.co/v2/subscriptions/{id}/phases \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 0
},
"data": [
{
"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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Response
List of SubscriptionPhase.
Subscription phase ID.
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.
setup
, trial
, standard
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.
pending
, active
, finished
Order in which the phase is executed within all subscription phases.
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.
immediately
, manual
, start_date
, quote_signature
, checkout
, contract_start_date
, previous_phase_end
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.
manual
, end_date
, duration
, contract_end_date
Represents when the first billing date occurs.
phase_start
: Aligns with the start of the phase.specific_date
: Occurs on a specified date.
phase_start
, specific_date
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.
Actual start date of the phase. UTC date time string in the ISO 8601 format.
Actual end date of the phase. UTC date time string in the ISO 8601 format.
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.
prorata
, pay_in_full
, none
Represents when the transition amount will be invoiced.
immediately
: An invoice will be generated immediately with the corresponding amount.
immediately
Products comprising the subscription phase.
Product ID.
Product name. This will appear on the final invoices.
Product description. This will appear on the final invoices.
Indicates if the dates of the interval should be automatically added in the product description on the invoices.
Date on which the product has been attached to the subscription. UTC date time string in the ISO 8601 format.
Date on which the product has been detached from the subscription. UTC date time string in the ISO 8601 format.
Date on which the current period started. UTC date time string in the ISO 8601 format.
Date on which the current period will end. UTC date time string in the ISO 8601 format.
Date on which the next subscription product payment will occur. UTC date time string in the ISO 8601 format.
Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval.
once
Indicates if the product should be billed at the start or the end of the payment interval.
start
, end
flat_fee
Number of product units.
Coupons comprising the subscription phase.
Coupon description.
amount
Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.
Currency code. See ISO 4217.
EUR
, AED
, AFN
, XCD
, ALL
, AMD
, AOA
, ARS
, USD
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, XOF
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, NOK
, BWP
, BYR
, BZD
, CAD
, CDF
, XAF
, CHF
, NZD
, CLP
, CNY
, COP
, CRC
, CUP
, CVE
, ANG
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, MAD
, ERN
, ETB
, FJD
, FKP
, GBP
, GEL
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, INR
, IQD
, IRR
, ISK
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRO
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, XPF
, NGN
, NIO
, NPR
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLL
, SOS
, SRD
, SSP
, STD
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TWD
, TZS
, UAH
, UGX
, UYU
, UZS
, VEF
, VND
, VUV
, WST
, YER
, ZAR
, ZMW
, ZWL
Coupon ID.
Coupon name.
Coupon identifier in the context of the subscription.
Coupon frequency.
once
: Will apply the coupon only to the first one invoice.forever
: Will apply the coupon to all invoices.custom
: Will apply to coupon until a specified expiration date.
once
, forever
, custom
Product IDs to which the coupon will be applied.
Coupon first application date. UTC date time string in the ISO 8601 format.
Subscription phase creation date. UTC date time string in the ISO 8601 format.
Was this page helpful?
curl --request GET \
--url https://api.hyperline.co/v2/subscriptions/{id}/phases \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 0
},
"data": [
{
"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"
}
]
}