curl --request POST \
--url https://api.hyperline.co/v1/subscriptions/{id}/simulate-updates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_schedule": "immediately",
"payment_schedule": "immediately",
"calculation_method": "pro_rata",
"updates": [
{
"type": "add_product",
"payload": {
"product_id": "<string>",
"billing_interval_period": "days",
"billing_interval_count": 123,
"start_or_end": "start",
"type": "fee",
"product_name": "<string>",
"product_description": "<string>",
"count": 1,
"display_interval_dates_in_description": true,
"prices": [
{
"type": "fee",
"amount": 123
}
]
}
}
],
"apply_at": "2024-12-20T16:04:11Z"
}
'{
"amount": 123
}Simulate the effect of updates on a subscription without actually applying them.
curl --request POST \
--url https://api.hyperline.co/v1/subscriptions/{id}/simulate-updates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_schedule": "immediately",
"payment_schedule": "immediately",
"calculation_method": "pro_rata",
"updates": [
{
"type": "add_product",
"payload": {
"product_id": "<string>",
"billing_interval_period": "days",
"billing_interval_count": 123,
"start_or_end": "start",
"type": "fee",
"product_name": "<string>",
"product_description": "<string>",
"count": 1,
"display_interval_dates_in_description": true,
"prices": [
{
"type": "fee",
"amount": 123
}
]
}
}
],
"apply_at": "2024-12-20T16:04:11Z"
}
'{
"amount": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
immediately, scheduled immediately, next_invoice pro_rata, pay_in_full, do_not_charge Add a new product to bill as part of the subscription.
Show child attributes
The date when the update should be applied. Required when application_schedule is 'scheduled'.
"2024-12-20T16:04:11Z"
Simulation results
Was this page helpful?