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

# Update billing interval for subscription contract

> Changes the billing frequency of a subscription contract. This allows customers to modify how often they are charged for their membership.

**Key Features:**
- **Flexible Billing**: Change billing frequency (daily, weekly, monthly, yearly)
- **Custom Intervals**: Set custom interval counts (e.g., every 2 weeks, every 3 months)
- **Immediate Effect**: Changes apply to the next billing cycle
- **Independent from Delivery**: Billing interval can differ from delivery interval
- **Activity Logging**: All changes are logged for audit trail

**Billing Interval Options:**
- **DAY**: Daily billing (intervalCount: how many days)
- **WEEK**: Weekly billing (intervalCount: how many weeks)
- **MONTH**: Monthly billing (intervalCount: how many months)
- **YEAR**: Yearly billing (intervalCount: how many years)

**Common Examples:**
- `intervalCount=1, interval=MONTH`: Bill monthly
- `intervalCount=2, interval=WEEK`: Bill every 2 weeks
- `intervalCount=3, interval=MONTH`: Bill quarterly
- `intervalCount=6, interval=MONTH`: Bill semi-annually
- `intervalCount=1, interval=YEAR`: Bill annually

**Common Use Cases:**
- Customer wants to change from monthly to quarterly billing
- Switch from annual to monthly payments
- Adjust billing frequency to match cash flow
- Promotional frequency changes
- Align billing with payday schedules

**Important Notes:**
- **Next Billing Date**: System recalculates the next billing date based on new interval
- **Pro-rata Billing**: No pro-rata adjustment; new interval starts from next billing date
- **Minimum Cycles**: Respects minimum billing cycle requirements if configured
- **Customer Portal Protection**: Includes freeze checks if called from customer portal

**Authentication:** Requires API key authentication via X-API-Key header or api_key parameter



## OpenAPI

````yaml /memberships/admin-api-swagger.json put /api/external/v2/subscription-contracts-update-billing-interval
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing memberships, payments, and
    related operations. These APIs allow you to programmatically manage
    membership lifecycles, handle payments, configure products, and integrate
    membership functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://membership-admin.appstle.com
security: []
tags:
  - description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for subscription memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
    name: Cancellation Flow Configuration
  - description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
    name: Billing & Orders
  - description: >-
      APIs for managing one-time product additions to upcoming subscription
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership/subscription plan groups, including creating
      plans, configuring discounts, billing intervals, and assigning products to
      plans
    name: Membership Plans
  - description: >-
      APIs for managing subscription product bundles, bundle configurations,
      item grouping, and bundle-specific discount codes
    name: Product Bundles
  - description: >-
      APIs for retrieving custom CSS styles applied to subscription widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
    name: Customer Portal Configuration
  - description: >-
      APIs for managing membership/subscription contracts including creation,
      updates, status changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for managing subscription bundle configuration settings including
      bundle behavior, pricing rules, and display options
    name: Bundle Settings
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for subscriptions
    name: Customer Payment Methods
  - description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange subscription items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for subscription memberships.
    name: Product & Inventory Data
  - description: >-
      APIs for managing shop-level membership settings, configuration, and
      general store information.
    name: Shop Settings
  - description: >-
      APIs for performing bulk/mass operations on multiple membership contracts
      including status updates, product replacements, and billing date changes.
    name: Bulk Operations
paths:
  /api/external/v2/subscription-contracts-update-billing-interval:
    put:
      tags:
        - Membership Contracts
      summary: Update billing interval for subscription contract
      description: >-
        Changes the billing frequency of a subscription contract. This allows
        customers to modify how often they are charged for their membership.


        **Key Features:**

        - **Flexible Billing**: Change billing frequency (daily, weekly,
        monthly, yearly)

        - **Custom Intervals**: Set custom interval counts (e.g., every 2 weeks,
        every 3 months)

        - **Immediate Effect**: Changes apply to the next billing cycle

        - **Independent from Delivery**: Billing interval can differ from
        delivery interval

        - **Activity Logging**: All changes are logged for audit trail


        **Billing Interval Options:**

        - **DAY**: Daily billing (intervalCount: how many days)

        - **WEEK**: Weekly billing (intervalCount: how many weeks)

        - **MONTH**: Monthly billing (intervalCount: how many months)

        - **YEAR**: Yearly billing (intervalCount: how many years)


        **Common Examples:**

        - `intervalCount=1, interval=MONTH`: Bill monthly

        - `intervalCount=2, interval=WEEK`: Bill every 2 weeks

        - `intervalCount=3, interval=MONTH`: Bill quarterly

        - `intervalCount=6, interval=MONTH`: Bill semi-annually

        - `intervalCount=1, interval=YEAR`: Bill annually


        **Common Use Cases:**

        - Customer wants to change from monthly to quarterly billing

        - Switch from annual to monthly payments

        - Adjust billing frequency to match cash flow

        - Promotional frequency changes

        - Align billing with payday schedules


        **Important Notes:**

        - **Next Billing Date**: System recalculates the next billing date based
        on new interval

        - **Pro-rata Billing**: No pro-rata adjustment; new interval starts from
        next billing date

        - **Minimum Cycles**: Respects minimum billing cycle requirements if
        configured

        - **Customer Portal Protection**: Includes freeze checks if called from
        customer portal


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: updateBillingIntervalV2
      parameters:
        - description: Subscription contract ID
          example: 12345
          in: query
          name: contractId
          required: true
          schema:
            format: int64
            type: integer
        - description: API Key (Deprecated - Use Header X-API-Key instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            type: string
        - description: Number of intervals between billings
          example: 1
          in: query
          name: intervalCount
          required: true
          schema:
            minimum: 1
            type: string
        - description: Billing interval unit
          example: MONTH
          in: query
          name: interval
          required: true
          schema:
            enum:
              - DAY
              - WEEK
              - MONTH
              - YEAR
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Billing interval successfully updated
        '400':
          content:
            application/json:
              example:
                detail: Invalid billing interval or interval count
                status: 400
                title: Bad Request
          description: Invalid request - validation failed
        '401':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Authentication required - invalid or missing API key
        '403':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Updates frozen until minimum billing cycles completed
        '404':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Subscription contract not found
        '500':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
          description: Shopify API error during billing interval update
components:
  schemas:
    SubscriptionContract:
      properties:
        billingAttempts:
          $ref: '#/components/schemas/BillingAttempts'
        billingPolicy:
          $ref: '#/components/schemas/BillingPolicy'
        createdAt:
          type: object
        customAttributes:
          items:
            $ref: '#/components/schemas/CustomAttribute1'
          type: array
        customer:
          $ref: '#/components/schemas/Customer'
        customerPaymentMethod:
          $ref: '#/components/schemas/CustomerPaymentMethod'
        deliveryMethod:
          $ref: '#/components/schemas/DeliveryMethod'
        deliveryPolicy:
          $ref: '#/components/schemas/DeliveryPolicy'
        deliveryPrice:
          $ref: '#/components/schemas/DeliveryPrice'
        discounts:
          $ref: '#/components/schemas/Discounts'
        get__typename:
          type: string
        id:
          type: string
        lastPaymentStatus:
          enum:
            - SUCCEEDED
            - FAILED
            - $UNKNOWN
          type: string
        lines:
          $ref: '#/components/schemas/Lines'
        nextBillingDate:
          type: object
        note:
          type: string
        originOrder:
          $ref: '#/components/schemas/OriginOrder'
        status:
          enum:
            - ACTIVE
            - PAUSED
            - CANCELLED
            - EXPIRED
            - FAILED
            - $UNKNOWN
          type: string
        updatedAt:
          type: object
      type: object
    BillingAttempts:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node3'
          type: array
      type: object
    BillingPolicy:
      properties:
        anchors:
          items:
            $ref: '#/components/schemas/Anchor'
          type: array
        get__typename:
          type: string
        interval:
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
          type: string
        intervalCount:
          format: int32
          type: integer
        maxCycles:
          format: int32
          type: integer
        minCycles:
          format: int32
          type: integer
      type: object
    CustomAttribute1:
      properties:
        get__typename:
          type: string
        key:
          type: string
        value:
          type: string
      type: object
    Customer:
      properties:
        displayName:
          type: string
        email:
          deprecated: true
          type: string
        firstName:
          type: string
        get__typename:
          type: string
        id:
          type: string
        lastName:
          type: string
        phone:
          deprecated: true
          type: string
      type: object
    CustomerPaymentMethod:
      properties:
        get__typename:
          type: string
        id:
          type: string
        instrument:
          $ref: '#/components/schemas/Instrument'
        revokedAt:
          type: object
        revokedReason:
          enum:
            - AUTHORIZE_NET_GATEWAY_NOT_ENABLED
            - AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD
            - FAILED_TO_UPDATE_CREDIT_CARD
            - STRIPE_API_AUTHENTICATION_ERROR
            - STRIPE_API_INVALID_REQUEST_ERROR
            - STRIPE_GATEWAY_NOT_ENABLED
            - STRIPE_RETURNED_NO_PAYMENT_METHOD
            - STRIPE_PAYMENT_METHOD_NOT_CARD
            - BRAINTREE_API_AUTHENTICATION_ERROR
            - BRAINTREE_GATEWAY_NOT_ENABLED
            - BRAINTREE_RETURNED_NO_PAYMENT_METHOD
            - BRAINTREE_PAYMENT_METHOD_NOT_CARD
            - PAYMENT_METHOD_VERIFICATION_FAILED
            - THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED
            - MANUALLY_REVOKED
            - FAILED_TO_RETRIEVE_BILLING_ADDRESS
            - MERGED
            - CUSTOMER_REDACTED
            - TOO_MANY_CONSECUTIVE_FAILURES
            - CVV_ATTEMPTS_LIMIT_EXCEEDED
            - $UNKNOWN
          type: string
      type: object
    DeliveryMethod:
      properties:
        additionalInformation:
          $ref: '#/components/schemas/AdditionalInformation'
        brandedPromise:
          $ref: '#/components/schemas/BrandedPromise'
        get__typename:
          type: string
        id:
          type: string
        maxDeliveryDateTime:
          type: object
        methodType:
          enum:
            - SHIPPING
            - PICK_UP
            - NONE
            - RETAIL
            - LOCAL
            - PICKUP_POINT
            - $UNKNOWN
          type: string
        minDeliveryDateTime:
          type: object
        serviceCode:
          type: string
      type: object
    DeliveryPolicy:
      properties:
        anchors:
          items:
            $ref: '#/components/schemas/Anchor1'
          type: array
        get__typename:
          type: string
        interval:
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
          type: string
        intervalCount:
          format: int32
          type: integer
      type: object
    DeliveryPrice:
      properties:
        amount:
          type: object
        currencyCode:
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
          type: string
        get__typename:
          type: string
      type: object
    Discounts:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node2'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo2'
      type: object
    Lines:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
      type: object
    OriginOrder:
      properties:
        fulfillmentOrders:
          $ref: '#/components/schemas/FulfillmentOrders'
        get__typename:
          type: string
        id:
          type: string
        name:
          type: string
      type: object
    Node3:
      properties:
        completedAt:
          type: object
        createdAt:
          type: object
        get__typename:
          type: string
        id:
          type: string
        idempotencyKey:
          type: string
        ready:
          deprecated: true
          type: boolean
      type: object
    Anchor:
      properties:
        cutoffDay:
          format: int32
          type: integer
        day:
          format: int32
          type: integer
        get__typename:
          type: string
        month:
          format: int32
          type: integer
        type:
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
          type: string
      type: object
    Instrument:
      properties:
        get__typename:
          type: string
      type: object
    AdditionalInformation:
      properties:
        get__typename:
          type: string
        instructions:
          type: string
      type: object
    BrandedPromise:
      properties:
        get__typename:
          type: string
        handle:
          type: string
        name:
          type: string
      type: object
    Anchor1:
      properties:
        cutoffDay:
          format: int32
          type: integer
        day:
          format: int32
          type: integer
        get__typename:
          type: string
        month:
          format: int32
          type: integer
        type:
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
          type: string
      type: object
    Node2:
      properties:
        createdAt:
          type: object
        deliveredAt:
          type: object
        displayStatus:
          enum:
            - ATTEMPTED_DELIVERY
            - CANCELED
            - CONFIRMED
            - DELAYED
            - DELIVERED
            - FAILURE
            - FULFILLED
            - CARRIER_PICKED_UP
            - IN_TRANSIT
            - LABEL_PRINTED
            - LABEL_PURCHASED
            - LABEL_VOIDED
            - MARKED_AS_FULFILLED
            - NOT_DELIVERED
            - OUT_FOR_DELIVERY
            - READY_FOR_PICKUP
            - PICKED_UP
            - SUBMITTED
            - $UNKNOWN
          type: string
        estimatedDeliveryAt:
          type: object
        get__typename:
          type: string
        id:
          type: string
        inTransitAt:
          type: object
        name:
          type: string
        requiresShipping:
          type: boolean
        service:
          $ref: '#/components/schemas/Service'
        status:
          enum:
            - PENDING
            - OPEN
            - SUCCESS
            - CANCELLED
            - ERROR
            - FAILURE
            - $UNKNOWN
          type: string
        trackingInfo:
          items:
            $ref: '#/components/schemas/TrackingInfo'
          type: array
      type: object
    PageInfo2:
      properties:
        endCursor:
          type: string
        get__typename:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
      type: object
    Node:
      properties:
        get__typename:
          type: string
      type: object
    PageInfo:
      properties:
        endCursor:
          type: string
        get__typename:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
      type: object
    FulfillmentOrders:
      properties:
        get__typename:
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/Node'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo2'
      type: object
    Service:
      properties:
        get__typename:
          type: string
        handle:
          type: string
        serviceName:
          type: string
        type:
          enum:
            - GIFT_CARD
            - MANUAL
            - THIRD_PARTY
            - $UNKNOWN
          type: string
      type: object
    TrackingInfo:
      properties:
        company:
          type: string
        get__typename:
          type: string
        number:
          type: string
        url:
          type: object
      type: object

````