Renew Contract
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_id
account_id
Headers
X-Restate-Secret-Key
Response
Successful Response
status
Allowed values:
subscription_id
new_total_billing_cycles
new_remaining_billing_cycles
reason