Skip to main content
PUT
/
api
/
public
/
billing
/
coworkerContracts
/
v2
/
{contractId}
/
pause
{
  "400 Bad Request": {},
  "401 Unauthorized": {},
  "404 Not Found": {}
}

Pause Contract

Submits a request to pause (freeze) a plan contract for a specified number of billing cycles. While paused, the plan’s recurring charges are suspended. Additional services such as bookings may still generate charges during the pause period.
Before calling this endpoint, retrieve pause eligibility and options via GET /api/public/billing/coworkerContracts/{contractId}/pause/meta. Always present and obtain acceptance of the pause terms and conditions before submitting.

Authentication

This endpoint requires an authenticated customer session.

Path Parameters

contractId
number
required
The unique identifier of the contract to pause.

Request Body

PauseCycles
number
required
The number of billing cycles to pause the contract for. Must be at least 1. The available options are returned by the pause metadata endpoint as PauseUntilOptions.

Response

A successful response returns an empty body or a generic confirmation. No typed response object is defined for this endpoint.

Example Request

{
  "PauseCycles": 2
}

Usage in Portal

Called when the customer confirms the pause action in the pause modal.
  • File: src/views/user/plans/useMyPlansData.ts
  • Used by: src/views/user/plans/components/PauseContractModal.tsx

Typical integration pattern

// From src/api/endpoints.ts
// endpoints.billing.contracts.pause = (contractId: number) => ({
//   url: `/api/public/billing/coworkerContracts/v2/${contractId}/pause`,
// })

// Usage
const pauseContract = async (contractId: number, pauseCycles: number) => {
  return httpClient.put(endpoints.billing.contracts.pause(contractId).url, { PauseCycles: pauseCycles })
}
  • GET /api/public/billing/coworkerContracts/{contractId}/pause/meta – Get pause eligibility and options
  • GET /api/public/billing/coworkerContracts/pause/bookings – Preview bookings affected by the pause
  • PUT /api/public/billing/coworkerContracts/v2/{contractId}/resume – Resume a paused contract

Error Responses

400 Bad Request
error
The contract cannot be paused (e.g., already paused, limit reached, or the plan does not support pausing). The response body contains an error code.
401 Unauthorized
error
The current user is not authenticated or does not have access to this contract.
404 Not Found
error
Contract with the specified ID does not exist.