> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmhouse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activate a subscription with a recalculated billing date

> Use the Firmhouse GraphQL API to activate a subscription and recalculate the subscribed plan billing date from the activation date.

Use `activateSubscription` with `recalculateNextBillingDate: true` when your integration activates subscriptions after signup and wants the subscribed plan's next billing date to be based on the activation date.

This is useful for manual approval flows where a customer signs up first, but the subscription only starts after a later API activation. Without `recalculateNextBillingDate`, Firmhouse keeps the existing next billing date when it is already scheduled.

## Requirements

* A Firmhouse API access token with write access.
* An inactive subscription in the same Firmhouse project.
* A subscription setup where products follow the subscribed plan billing schedule.

## Activate and recalculate

Send a GraphQL request to the Firmhouse API and pass `recalculateNextBillingDate: true` to `activateSubscription`.

```graphql theme={null}
mutation ActivateSubscription($id: ID!, $recalculateNextBillingDate: Boolean) {
  activateSubscription(input: { id: $id, recalculateNextBillingDate: $recalculateNextBillingDate }) {
    subscription {
      id
      status
      nextBillingDate
    }
    errors {
      attribute
      message
    }
  }
}
```

Use variables for the subscription ID and recalculation option:

```json theme={null}
{
  "id": "123456",
  "recalculateNextBillingDate": true
}
```

When `recalculateNextBillingDate` is true, Firmhouse recalculates the subscribed plan's next billing date from the activation date. When `recalculateNextBillingDate` is omitted or false, Firmhouse keeps the existing activation behavior.

## Example

If a customer signs up on May 28 and your integration activates the subscription on June 2, `recalculateNextBillingDate: true` can move the next billing date from the signup-based schedule to the activation-based schedule.

## Related

* [Generate API access tokens](/configure/integrations/api-access-tokens)
* [Subscription activation strategy](/configure/activation-and-cancellation/activation-strategy)
* [API Reference](https://developer.firmhouse.com/graphql-api/api-reference)
