- Documentation
- API Reference
- Integrations
- Changelog
- Blog
- GETGet analytics
- GETGet companies
- GETGet custom properties
- POSTCreate custom property
- PUTUpdate custom property
- DELDelete custom property
- GETGet customers
- POSTCreate customer
- GETGet customer
- PUTUpdate customer
- DELDelete customer
- GETGet customer portal
- PUTArchive customer
- POSTBulk update providers/customers mapping
- GETList credit products
- POSTCreate credit product
- GETGet credit product
- GETList credit transactions
- POSTPurchase credits
- POSTTopup credits
- POSTCreate credits usage
- POSTCreate component token
- GETGet invoices
- POSTCreate one-off invoice
- POSTSends a draft invoice for payment
- GETGet invoice
- GETDownload invoice
- POSTCreate transaction
- GETGet invoicing entities
- POSTCreate invoicing entity
- GETGet invoicing entity
- PUTUpdate invoicing entity
- DELDelete invoicing entity
- POSTCreate payment
- POSTUpdate prices
- POSTRefresh subscriptions
- POSTCreate subscription update
- POSTCancel subscription
- POSTPause subscription
- POSTReactivate subscription
- GETGet subscriptions
- POSTCreate subscription
- GETGet subscription
- POSTRefresh seat products
Analytics
Companies
Custom properties
Customers
Customers > Credits
Integrations
Invoices
Invoicing entities
Payments
Price configurations
Subscriptions
Get subscriptions
Retrieve all existing subscriptions.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
curl --request GET \
--url https://api.hyperline.co/v2/subscriptions \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 123
},
"data": [
{
"id": "sub_B6ClkdqNqVNBgY",
"currency": "EUR",
"status": "active",
"purchase_order": "<string>",
"properties": {},
"customer_id": "cus_QalW2vTAdkR6IY",
"plan_id": "plan_zHmjoDee4ZRmQV",
"minimum_invoice_fee": 250,
"invoicing_entity_id": "ive_jerrb484RHn",
"checkout_session_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": true,
"activation_strategy": "checkout",
"starts_at": "2023-01-20T16:04:11Z",
"paused_at": "2023-01-20T16:04:11Z",
"reactivate_at": "2023-01-20T16:04:11Z",
"cancel_at": "2023-01-20T16:04:11Z",
"cancellation_strategy": "refund_prorata",
"cancellation_amount": 123,
"estimated_arr": 123,
"current_period_started_at": "2023-01-20T16:04:11Z",
"current_period_ends_at": "2023-01-20T16:04:11Z",
"next_payment_at": "2023-01-20T16:04:11Z",
"next_payment_amount": 123,
"renews_at": "2023-01-20T16:04:11Z",
"trial_ends_at": "2023-01-20T16:04:11Z",
"created_at": "2023-01-20T16:04:11Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
all
, inactive
, active
, errored
, cancelled
, paused
, pending
, draft
, voided
all
, inactive
, active
, errored
, cancelled
, paused
, pending
, draft
, voided
all
, inactive
, active
, errored
, cancelled
, paused
, pending
, draft
, voided
Response
Total of existing items.
Number of items returned.
Number of items skipped.
List of Subscription.
Subscription ID.
Currency code. See ISO 4217.
Subscription status.
draft
: The subscription is being created, this status is only used in the subscription assignation flow of the UI version of Hyperline.pending
: The subscription has been created and won't be charged until it is activated.active
: The subscription is running and will be invoiced at the next payment date.paused
: The subscription's payment collection is paused.cancelled
: The subscription has been canceled from an active state.voided
: The subscription has been voided directly from the pending state.errored
: We attempted 4 times (3 retries) and failed to charge a subscription's invoice, see Handling payment errors. We consider the subscription as inactive (as the customer failed to pay you) meaning that we won't invoice the customer in the future nor collect payment. You can choose to reactivate it manually.
active
, cancelled
, draft
, errored
, paused
, pending
, voided
Reference to the purchase order.
Key/value pairs to store any information you find useful.
ID of the customer.
ID of the plan used to create the subscription.
Minimum fee applied to each invoice outside of one time payments
ID of the invoicing entity attached to the subscription
ID of the checkout session.
Interval used to represent the commitment period of the subscription. Note that the commitment interval is different than the subscription duration (e.g. you can have a mandatory commitment of 1 year but an unlimited subscription).
days
, weeks
, months
, years
Indicates if the subscription should automatically renew.
Strategy used to activate the subscription.
start_date
: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.manually
: The subscription requires activation through a manual action.checkout
: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.quote
: The subscription will be activated depending on the configuration and the signature of the related quote.
start_date
, manually
, checkout
, quote
Subscription contract start date. UTC date time string in the ISO 8601 format.
Date when the subscription was paused. Only applies to paused
status. UTC date time string in the ISO 8601 format.
Date when the subscription was reactivated after the last pause event. UTC date time string in the ISO 8601 format.
Subscription cancel date. UTC date time string in the ISO 8601 format.
Strategy used to cancel the subscription. If not specified do_nothing
is used.
charge_prorata
: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.charge_custom
: Will charge the customer a custom amount.refund_prorata
: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.refund_custom
: Will refund to the customer a custom amount.end_of_period
: Will cancel the subscription at the end date of the current billing period.do_nothing
: Will only cease the subscription without any additional actions.
refund_prorata
, refund_custom
, charge_prorata
, charge_custom
, end_of_period
, do_nothing
Custom amount used when cancelling the subscription. Only applies to the charge_custom
or the refund_custom
cancellation strategy.
Estimated Annual Recurring Revenue generated by the subscription.
Start date of the current billing period. UTC date time string in the ISO 8601 format.
End date of the current billing period. UTC date time string in the ISO 8601 format.
Date on which the next subscription payment will occur. UTC date time string in the ISO 8601 format.
The amount of the next subscription payment. The system will generate an invoice to pay on the next_payment_at
.
Next subscription commitment renewal date. UTC date time string in the ISO 8601 format.
End date of the trial period. UTC date time string in the ISO 8601 format.
Subscription creation date. UTC date time string in the ISO 8601 format.
curl --request GET \
--url https://api.hyperline.co/v2/subscriptions \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 123
},
"data": [
{
"id": "sub_B6ClkdqNqVNBgY",
"currency": "EUR",
"status": "active",
"purchase_order": "<string>",
"properties": {},
"customer_id": "cus_QalW2vTAdkR6IY",
"plan_id": "plan_zHmjoDee4ZRmQV",
"minimum_invoice_fee": 250,
"invoicing_entity_id": "ive_jerrb484RHn",
"checkout_session_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": true,
"activation_strategy": "checkout",
"starts_at": "2023-01-20T16:04:11Z",
"paused_at": "2023-01-20T16:04:11Z",
"reactivate_at": "2023-01-20T16:04:11Z",
"cancel_at": "2023-01-20T16:04:11Z",
"cancellation_strategy": "refund_prorata",
"cancellation_amount": 123,
"estimated_arr": 123,
"current_period_started_at": "2023-01-20T16:04:11Z",
"current_period_ends_at": "2023-01-20T16:04:11Z",
"next_payment_at": "2023-01-20T16:04:11Z",
"next_payment_amount": 123,
"renews_at": "2023-01-20T16:04:11Z",
"trial_ends_at": "2023-01-20T16:04:11Z",
"created_at": "2023-01-20T16:04:11Z"
}
]
}