Renew Contract

View as Markdown
Renew subscription contract (reset billing cycles). Called by Restate workflow. This endpoint is INTERNAL and called by the Restate workflow when a subscription has contract_auto_renew=True and remaining_billing_cycles reaches 0. The contract renewal: - Resets remaining_billing_cycles to total_billing_cycles - Allows the subscription to continue billing for another contract term Returns status-based response for workflow orchestration: - status: "renewed" or "skipped" - subscription_id: The subscription's ID - new_total_billing_cycles, new_remaining_billing_cycles: Updated values - reason: Explanation when status is "skipped"

Authentication

AuthorizationBearer

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

Path parameters

subscription_idstringRequired
account_idstringRequired

Headers

X-Restate-Secret-Keystring or nullOptional

Response

Successful Response
statusenum
Allowed values:
subscription_idstring or null
new_total_billing_cyclesinteger or null
new_remaining_billing_cyclesinteger or null
reasonstring or null

Errors