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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Change Billing Anchor Date

> Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates) for a subscription.

`square.changeBillingAnchorDate` changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates) for a subscription.

## Example

```ts automations/square-change-billing-anchor-date.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Change Square Billing Anchor Date", () => {
  onDashboardRun({ title: "Change Square Billing Anchor Date" })

  square.changeBillingAnchorDate({
    subscriptionId: "subscription_id",
    monthlyBillingAnchorDate: 1,
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `ITEMS_READ` and `SUBSCRIPTIONS_READ` and `SUBSCRIPTIONS_WRITE`.

| Field                      | Type             | Required | Default | Description                                                                                                                                                                                                                                 |
| -------------------------- | ---------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `subscriptionId`           | `string`         | Yes      | —       | The ID of the subscription to update the billing anchor date.                                                                                                                                                                               |
| `monthlyBillingAnchorDate` | `number \| null` | No       | —       | The anchor day for the billing cycle.                                                                                                                                                                                                       |
| `effectiveDate`            | `string \| null` | No       | —       | The `YYYY-MM-DD`-formatted date when the scheduled `BILLING_ANCHOR_CHANGE` action takes place on the subscription. When this date is unspecified or falls within the current billing cycle, the billing anchor date is changed immediately. |

Use the official [ChangeBillingAnchorDate reference](https://developer.squareup.com/reference/square/subscriptions-api/change-billing-anchor-date) for provider field semantics and limits.

## Output

Returns the official `Square.ChangeBillingAnchorDateResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
