v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Subscriptions

ChangeBillingAnchorDate

Changes the billing anchor date for a subscription.

post/v2/subscriptions/{subscription_id}/billing-anchor

Path parameters

subscription_idstring required

The ID of the subscription to update the billing anchor date.

Request body

monthly_billing_anchor_dateinteger nullable

The anchor day for the billing cycle.

effective_datestring nullable

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.

Example request

{
  "monthly_billing_anchor_date": 1
}

Response

Success

Example response

{
  "actions": [
    {
      "effective_date": "2023-11-01",
      "id": "f0a1dfdc-675b-3a14-a640-99f7ac1cee83",
      "monthly_billing_anchor_date": 1,
      "type": "CHANGE_BILLING_ANCHOR_DATE"
    }
  ],
  "subscription": {
    "created_at": "2023-06-20T21:53:10Z",
    "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
    "id": "9ba40961-995a-4a3d-8c53-048c40cafc13",
    "location_id": "S8GWD5R9QB376",
    "monthly_billing_anchor_date": 20,
    "phases": [
      {
        "order_template_id": "E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY",
        "ordinal": 0,
        "plan_phase_uid": "C66BKH3ASTDYGJJCEZXQQSS7",
        "uid": "98d6f53b-40e1-4714-8827-032fd923be25"
      }
    ],
    "plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7",
    "price_override_money": {
      "amount": 2000,
      "currency": "USD"
    },
    "source": {
      "name": "My Application"
    },
    "status": "ACTIVE",
    "timezone": "America/Los_Angeles",
    "version": 3
  }
}