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

# Validate taxes on a billing schedule

> Validate the tax strategy that will apply to the given billing schedule before it's created or updated.



## OpenAPI

````yaml billing.latest.product.live POST /billing-schedules/validate-taxes
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /billing-schedules/validate-taxes:
    servers: []
    parameters: []
    post:
      tags:
        - Billing Schedules
      summary: Validate taxes on a billing schedule
      description: >-
        Validate the tax strategy that will apply to the given billing schedule
        before it's created or updated.
      operationId: postBillingSchedulesValidateTaxes
      parameters:
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillingScheduleRequest'
              example:
                customerId: cca32597-b6b0-4499-9669-128aef8702e4
                startDate: '2022-01-01'
                endDate: '2022-12-31'
                recurrenceDayOfMonth: 1
                taxRates:
                  - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                autoIssueInvoices: false
                purchaseOrderNumber: PO123
                reference: Example reference
                label: Example label
                paymentProvider: STRIPE
                isDraft: true
                rollUpBilling: false
                phases:
                  - name: Trial Period
                    priceIds:
                      - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    startDate: '2022-01-01'
                    endDate: '2022-06-30'
                    discounts:
                      - restrictToPrices:
                          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        type: PERCENTAGE
                        amount: 8
                        message: 8% Discount
                        separateLineItem: true
                        seatDiscountType: ALL_SEATS
                    minimums:
                      - restrictToPrices:
                          - 9fe9986b-e205-42b7-a58f-42845c91f03f
                        amount: 100
                    listPriceIds:
                      - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                    recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                    phasePriceMetadata:
                      - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        arrCalculation: INCLUDE
                    phaseListPriceMetadata:
                      - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                        arrCalculation: INCLUDE
                  - priceIds: []
                    startDate: '2022-07-01'
                    endDate: '2022-12-31'
                    discounts: []
                    minimums:
                      - restrictToPrices:
                          - 9fe9986b-e205-42b7-a58f-42845c91f03f
                        amount: 100
                    listPriceIds:
                      - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                    recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                    phasePriceMetadata:
                      - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                        arrCalculation: INCLUDE
                    phaseListPriceMetadata:
                      - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                        arrCalculation: INCLUDE
                attachmentAssetIds:
                  - 5055cd17-d5e8-4286-bddf-79729ddabf51
                autoCharge: true
                defaultDueDateDays: 30
                memo: Example Billing Schedule
                customFields:
                  key: value
            examples:
              CreateBillingScheduleRequest:
                summary: ''
                value:
                  customerId: cca32597-b6b0-4499-9669-128aef8702e4
                  startDate: '2022-01-01'
                  endDate: '2022-12-31'
                  recurrenceDayOfMonth: 1
                  taxRates:
                    - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                      taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                  autoIssueInvoices: false
                  purchaseOrderNumber: PO123
                  reference: Example reference
                  label: Example label
                  paymentProvider: STRIPE
                  isDraft: true
                  rollUpBilling: false
                  phases:
                    - name: Trial Period
                      priceIds:
                        - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      startDate: '2022-01-01'
                      endDate: '2022-06-30'
                      discounts:
                        - restrictToPrices:
                            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          type: PERCENTAGE
                          amount: 8
                          message: 8% Discount
                          separateLineItem: true
                          seatDiscountType: ALL_SEATS
                      minimums:
                        - restrictToPrices:
                            - 9fe9986b-e205-42b7-a58f-42845c91f03f
                          amount: 100
                      listPriceIds:
                        - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                      recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                      phasePriceMetadata:
                        - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          arrCalculation: INCLUDE
                      phaseListPriceMetadata:
                        - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                          arrCalculation: INCLUDE
                    - priceIds: []
                      startDate: '2022-07-01'
                      endDate: '2022-12-31'
                      discounts: []
                      minimums:
                        - restrictToPrices:
                            - 9fe9986b-e205-42b7-a58f-42845c91f03f
                          amount: 100
                      listPriceIds:
                        - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                      recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                      phasePriceMetadata:
                        - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          arrCalculation: INCLUDE
                      phaseListPriceMetadata:
                        - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                          arrCalculation: INCLUDE
                  attachmentAssetIds:
                    - 5055cd17-d5e8-4286-bddf-79729ddabf51
                  autoCharge: true
                  defaultDueDateDays: 30
                  memo: Example Billing Schedule
                  customFields:
                    key: value
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    CreateBillingScheduleRequest:
      required:
        - autoIssueInvoices
        - customerId
        - isDraft
        - phases
        - rollUpBilling
        - startDate
        - taxRates
      type: object
      example:
        customerId: cca32597-b6b0-4499-9669-128aef8702e4
        startDate: '2022-01-01'
        endDate: '2022-12-31'
        recurrenceDayOfMonth: 1
        taxRates:
          - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
        autoIssueInvoices: false
        purchaseOrderNumber: PO123
        reference: Example reference
        label: Example label
        paymentProvider: STRIPE
        isDraft: true
        rollUpBilling: false
        phases:
          - name: Trial Period
            priceIds:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            startDate: '2022-01-01'
            endDate: '2022-06-30'
            discounts:
              - restrictToPrices:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                type: PERCENTAGE
                amount: 8
                message: 8% Discount
                separateLineItem: true
                seatDiscountType: ALL_SEATS
            minimums:
              - restrictToPrices:
                  - 9fe9986b-e205-42b7-a58f-42845c91f03f
                amount: 100
            listPriceIds:
              - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
            phasePriceMetadata:
              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                arrCalculation: INCLUDE
            phaseListPriceMetadata:
              - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                arrCalculation: INCLUDE
          - priceIds: []
            startDate: '2022-07-01'
            endDate: '2022-12-31'
            discounts: []
            minimums:
              - restrictToPrices:
                  - 9fe9986b-e205-42b7-a58f-42845c91f03f
                amount: 100
            listPriceIds:
              - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
            phasePriceMetadata:
              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                arrCalculation: INCLUDE
            phaseListPriceMetadata:
              - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                arrCalculation: INCLUDE
        attachmentAssetIds:
          - 5055cd17-d5e8-4286-bddf-79729ddabf51
        autoCharge: true
        defaultDueDateDays: 30
        memo: Example Billing Schedule
        customFields:
          key: value
      properties:
        customerId:
          type: string
          description: Customer ID
          example: cca32597-b6b0-4499-9669-128aef8702e4
        startDate:
          type: string
          description: Start date
          format: date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date. A null end date denotes an open-ended schedule.
          format: date
          example: '2022-12-31'
        recurrenceDayOfMonth:
          type: integer
          description: Recurrence day of month
          format: int32
          example: 1
        taxRates:
          type: array
          description: Tax Rate for each Product
          example:
            - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
          items:
            $ref: '#/components/schemas/ProductTaxRateRepresentation'
        autoIssueInvoices:
          type: boolean
          description: Auto-issue invoices for this billing schedule
          example: false
        purchaseOrderNumber:
          type: string
          description: Optional purchase order number to be added to invoices
          example: PO123
        reference:
          type: string
          description: Optional reference to be added to invoices
          example: Example reference
        label:
          type: string
          description: Optional label
          example: Example label
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: Payment provider to set up collection for
        isDraft:
          type: boolean
          description: Create in draft status
          example: true
        rollUpBilling:
          type: boolean
          description: Toggles Roll-up billing
          example: false
        phases:
          type: array
          description: Phases
          example:
            - name: Trial Period
              priceIds:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              startDate: '2022-01-01'
              endDate: '2022-06-30'
              discounts:
                - restrictToPrices:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  type: PERCENTAGE
                  amount: 8
                  message: 8% Discount
                  separateLineItem: true
                  seatDiscountType: ALL_SEATS
              minimums:
                - restrictToPrices:
                    - 9fe9986b-e205-42b7-a58f-42845c91f03f
                  amount: 100
              listPriceIds:
                - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
              recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
              phasePriceMetadata:
                - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  arrCalculation: INCLUDE
              phaseListPriceMetadata:
                - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                  arrCalculation: INCLUDE
            - priceIds: []
              startDate: '2022-07-01'
              endDate: '2022-12-31'
              discounts: []
              minimums:
                - restrictToPrices:
                    - 9fe9986b-e205-42b7-a58f-42845c91f03f
                  amount: 100
              listPriceIds:
                - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
              recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
              phasePriceMetadata:
                - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  arrCalculation: INCLUDE
              phaseListPriceMetadata:
                - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
                  arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhaseRequest'
        attachmentAssetIds:
          type: array
          description: IDs of assets that are attached to this schedule
          example:
            - 5055cd17-d5e8-4286-bddf-79729ddabf51
          items:
            type: string
        autoCharge:
          type: boolean
          description: Automatically collect payments if payment details are available
          example: true
        defaultDueDateDays:
          type: integer
          description: >-
            Default number of days between invoice issue date and due date.
            Overrides any invoice level set default due date
          example: 30
        memo:
          type: string
          description: Billing schedule memo. Overrides any invoice level set memo
          example: Example Billing Schedule
        customFields:
          type: object
          description: Custom key-value fields for this billing schedule
          additionalProperties:
            type: string
    ProductTaxRateRepresentation:
      required:
        - priceId
        - taxRateId
      type: object
      example:
        priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
      properties:
        priceId:
          type: string
          description: ID of the Price
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId:
          type: string
          description: ID of the Tax Rate
          example: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
    PaymentProvider:
      type: string
      example: STRIPE
      enum:
        - STRIPE
        - GOCARDLESS
        - NONE
    PhaseRequest:
      required:
        - priceIds
        - startDate
      type: object
      example:
        name: Trial Period
        priceIds:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        startDate: '2022-01-01'
        endDate: '2022-06-30'
        discounts:
          - restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            type: PERCENTAGE
            amount: 8
            message: 8% Discount
            separateLineItem: true
            seatDiscountType: ALL_SEATS
        minimums:
          - restrictToPrices:
              - 9fe9986b-e205-42b7-a58f-42845c91f03f
            amount: 100
        listPriceIds:
          - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
        phasePriceMetadata:
          - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            arrCalculation: INCLUDE
        phaseListPriceMetadata:
          - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
            arrCalculation: INCLUDE
      properties:
        name:
          type: string
          description: Optional name for the Phase
          example: Trial Period
        priceIds:
          type: array
          description: The price IDs included in this phase
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        startDate:
          type: string
          description: Phase start date
          format: date
          example: '2022-01-01'
        endDate:
          type: string
          description: >-
            Phase end date. A null end date denotes an open-ended phase. Only
            the last phase can be open-ended.
          format: date
          example: '2022-06-30'
        discounts:
          type: array
          description: Discounts applicable to this phase
          example:
            - restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              type: PERCENTAGE
              amount: 8
              message: 8% Discount
              separateLineItem: true
              seatDiscountType: ALL_SEATS
          items:
            $ref: '#/components/schemas/EmbeddableDiscountRequest'
        minimums:
          type: array
          description: Minimums applicable to this phase
          example:
            - restrictToPrices:
                - 9fe9986b-e205-42b7-a58f-42845c91f03f
              amount: 100
          items:
            $ref: '#/components/schemas/MinimumRequest'
        listPriceIds:
          type: array
          description: IDs of list prices from which to create prices for this phase
          example:
            - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
          items:
            type: string
        recurrencePreference:
          $ref: '#/components/schemas/PhaseRecurrencePreference'
          description: Phase recurrence preference
        phasePriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            price
          example:
            - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhasePriceMetadata'
        phaseListPriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            list price
          example:
            - listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhaseListPriceMetadata'
    EmbeddableDiscountRequest:
      required:
        - amount
        - message
        - separateLineItem
        - type
      type: object
      example:
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        type: PERCENTAGE
        amount: 8
        message: 8% Discount
        separateLineItem: true
        seatDiscountType: ALL_SEATS
      properties:
        restrictToPrices:
          type: array
          description: Price IDs to which this discount applies
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        type:
          $ref: '#/components/schemas/DiscountCalculationType'
          description: Whether the discount is a nominal or percentage amount
        amount:
          type: number
          description: The discount amount
          example: 8
        message:
          type: string
          description: The message to show on an invoice
          example: 8% Discount
        separateLineItem:
          type: boolean
          description: If true the discount will show as a separate line item on an invoice
          example: true
        seatDiscountType:
          $ref: '#/components/schemas/SeatDiscountType'
          description: Determines how the discount is applied to any seat-based prices
    MinimumRequest:
      required:
        - amount
      type: object
      example:
        restrictToPrices:
          - 9fe9986b-e205-42b7-a58f-42845c91f03f
        amount: 100
      properties:
        restrictToPrices:
          type: array
          description: Price IDs to which this minimum applies
          example:
            - 9fe9986b-e205-42b7-a58f-42845c91f03f
          items:
            type: string
        amount:
          type: number
          description: The minimum amount
          example: 100
    PhaseRecurrencePreference:
      type: string
      example: CONTINUE_FROM_PREVIOUS_PHASE
      enum:
        - CONTINUE_FROM_PREVIOUS_PHASE
        - RESET
    PhasePriceMetadata:
      required:
        - arrCalculation
        - priceId
      type: object
      example:
        priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation: INCLUDE
      properties:
        priceId:
          type: string
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation:
          $ref: '#/components/schemas/ArrCalculation'
    PhaseListPriceMetadata:
      required:
        - arrCalculation
        - listPriceId
      type: object
      example:
        listPriceId: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        arrCalculation: INCLUDE
      properties:
        listPriceId:
          type: string
          example: 45e16eb7-2170-4632-b04f-9ecd90b85b1e
        arrCalculation:
          $ref: '#/components/schemas/ArrCalculation'
    DiscountCalculationType:
      type: string
      example: PERCENTAGE
      enum:
        - PERCENTAGE
        - NOMINAL
    SeatDiscountType:
      type: string
      example: ALL_SEATS
      enum:
        - INCLUDED_SEATS_ONLY
        - OVERAGE_SEATS_ONLY
        - ALL_SEATS
    ArrCalculation:
      type: string
      example: INCLUDE
      enum:
        - INCLUDE
        - EXCLUDE

````