> ## 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.2024-07-30.product.live POST /billing-schedules/validate-taxes
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: 0.0.1
servers:
  - url: https://dev.seqhq.io
    description: E2E
  - url: https://dev.seqhq.io
    description: DEV
  - url: https://sandbox.sequencehq.com
    description: SANDBOX
  - url: https://eu.sequencehq.com
    description: PRODUCTION
security: []
tags:
  - name: Credits
  - name: Prices
  - name: Billing Schedules
  - name: Discounts
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
                    externalContractRef: ACME-2022-MSA
                    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
                    creditGrants:
                      - name: Monthly usage credits
                        creditUnitType: CURRENCY
                        currency: GBP
                        amount: 100
                        costOfCredit: 0
                        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                        grantRefreshFrequency: MONTHLY
                        billingFrequency: MONTHLY
                        rolloverMode: NONE
                        restrictToPrices:
                          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                        integrationIds:
                          - service: NetSuite
                            id: '1234'
                    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
                      externalContractRef: ACME-2022-MSA
                      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
                      creditGrants:
                        - name: Monthly usage credits
                          creditUnitType: CURRENCY
                          currency: GBP
                          amount: 100
                          costOfCredit: 0
                          taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                          grantRefreshFrequency: MONTHLY
                          billingFrequency: MONTHLY
                          rolloverMode: NONE
                          restrictToPrices:
                            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                          integrationIds:
                            - service: NetSuite
                              id: '1234'
                      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
            externalContractRef: ACME-2022-MSA
            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
            creditGrants:
              - name: Monthly usage credits
                creditUnitType: CURRENCY
                currency: GBP
                amount: 100
                costOfCredit: 0
                taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                grantRefreshFrequency: MONTHLY
                billingFrequency: MONTHLY
                rolloverMode: NONE
                restrictToPrices:
                  - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                integrationIds:
                  - service: NetSuite
                    id: '1234'
            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
          example: '2022-01-01'
        endDate:
          type: string
          description: End date. A null end date denotes an open-ended schedule.
          nullable: true
          example: '2022-12-31'
        recurrenceDayOfMonth:
          type: integer
          description: Recurrence day of month
          format: int32
          nullable: true
          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
          nullable: true
          example: PO123
        reference:
          type: string
          description: Optional reference to be added to invoices
          nullable: true
          example: Example reference
        label:
          type: string
          description: Optional label
          nullable: true
          example: Example label
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: Payment provider to set up collection for
          nullable: true
        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
              externalContractRef: ACME-2022-MSA
              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
              creditGrants:
                - name: Monthly usage credits
                  creditUnitType: CURRENCY
                  currency: GBP
                  amount: 100
                  costOfCredit: 0
                  taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                  grantRefreshFrequency: MONTHLY
                  billingFrequency: MONTHLY
                  rolloverMode: NONE
                  restrictToPrices:
                    - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                  integrationIds:
                    - service: NetSuite
                      id: '1234'
              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
          nullable: true
          example:
            - 5055cd17-d5e8-4286-bddf-79729ddabf51
          items:
            type: string
        autoCharge:
          type: boolean
          description: Automatically collect payments if payment details are available
          nullable: true
          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
          nullable: true
          example: 30
        memo:
          type: string
          description: Billing schedule memo. Overrides any invoice level set memo
          nullable: true
          example: Example Billing Schedule
        customFields:
          type: object
          description: Custom key-value fields for this billing schedule
          nullable: true
          example:
            key: value
          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
        externalContractRef: ACME-2022-MSA
        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
        creditGrants:
          - name: Monthly usage credits
            creditUnitType: CURRENCY
            currency: GBP
            amount: 100
            costOfCredit: 0
            taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
            grantRefreshFrequency: MONTHLY
            billingFrequency: MONTHLY
            rolloverMode: NONE
            restrictToPrices:
              - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
            integrationIds:
              - service: NetSuite
                id: '1234'
        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
          nullable: true
          example: Trial Period
        externalContractRef:
          type: string
          description: >-
            Free-text reference to the contract this phase rolls up to in an
            external system. Phases sharing a reference belong to the same
            contract; surrounding whitespace is trimmed, and matching is
            case-sensitive. On update, omitting this field or sending null
            clears any existing reference and has the phase roll up to the
            billing schedule itself.
          nullable: true
          example: ACME-2022-MSA
        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
          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.
          nullable: true
          example: '2022-06-30'
        discounts:
          type: array
          description: Discounts applicable to this phase
          nullable: true
          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
          nullable: true
          example:
            - restrictToPrices:
                - 9fe9986b-e205-42b7-a58f-42845c91f03f
              amount: 100
          items:
            $ref: '#/components/schemas/MinimumRequest'
        creditGrants:
          type: array
          description: >-
            Credit grants applicable to this phase. Omit this field on every
            phase to leave the schedule's existing grants untouched. Once any
            phase provides it, the grants across all phases are the schedule's
            full grant spec: grants without an ID are created, grants re-sent
            with their ID are kept, and grants left out are removed. Grants
            cannot be updated through this request, and a grant that has already
            been drawn down cannot be removed this way — delete it through the
            credit grant endpoint instead.
          nullable: true
          example:
            - name: Monthly usage credits
              creditUnitType: CURRENCY
              currency: GBP
              amount: 100
              costOfCredit: 0
              taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
              grantRefreshFrequency: MONTHLY
              billingFrequency: MONTHLY
              rolloverMode: NONE
              restrictToPrices:
                - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
              integrationIds:
                - service: NetSuite
                  id: '1234'
          items:
            $ref: '#/components/schemas/EmbeddableCreditGrantRequest'
        listPriceIds:
          type: array
          description: IDs of list prices from which to create prices for this phase
          nullable: true
          example:
            - 45e16eb7-2170-4632-b04f-9ecd90b85b1e
          items:
            type: string
        recurrencePreference:
          $ref: '#/components/schemas/PhaseRecurrencePreference'
          description: Phase recurrence preference
          nullable: true
        phasePriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            price
          nullable: true
          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
          nullable: true
          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
          nullable: true
          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
          nullable: true
    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
          nullable: true
          example:
            - 9fe9986b-e205-42b7-a58f-42845c91f03f
          items:
            type: string
        amount:
          type: number
          description: The minimum amount
          example: 100
    EmbeddableCreditGrantRequest:
      required:
        - amount
        - creditUnitType
        - grantRefreshFrequency
        - name
        - rolloverMode
      type: object
      example:
        name: Monthly usage credits
        creditUnitType: CURRENCY
        currency: GBP
        amount: 100
        costOfCredit: 0
        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency: MONTHLY
        billingFrequency: MONTHLY
        rolloverMode: NONE
        restrictToPrices:
          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
        integrationIds:
          - service: NetSuite
            id: '1234'
      properties:
        name:
          type: string
          description: Name of the credit grant.
          example: Monthly usage credits
        creditUnitType:
          $ref: '#/components/schemas/CreditUnitType'
          description: Type of the unit of credit.
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency of cash credit if creditUnitType is CURRENCY.
          nullable: true
        amount:
          type: number
          description: Amount of units granted.
          example: 100
        costOfCredit:
          type: number
          description: Cost of credit grant.
          nullable: true
          example: 0
        taxRateId:
          type: string
          description: Tax rate ID for the credit grant.
          nullable: true
          example: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency:
          $ref: '#/components/schemas/GrantRefreshFrequency'
          description: How often the credit grant refreshes its balance.
        billingFrequency:
          $ref: '#/components/schemas/GrantBillingFrequency'
          description: >-
            How often the customer is charged for the credit grant. Omit to
            charge on the refresh cadence. One charge must cover whole refresh
            periods, so a quarterly refresh cannot be billed monthly. Cannot be
            changed once the grant exists: when id is set, send the stored value
            or omit it.
          nullable: true
        rolloverMode:
          $ref: '#/components/schemas/RolloverMode'
          description: Whether unused balance carries over when the grant refreshes.
        restrictToPrices:
          type: array
          description: >-
            Price IDs the grant is consumed against. Omit or leave empty to
            apply to every price in the phase.
          nullable: true
          example:
            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            type: string
        integrationIds:
          type: array
          description: >-
            IDs for this credit grant in external integrations, at most one per
            service. Set only when the grant is created: when id is set, send
            the grant's integrationIds as stored, or omit them. A value that
            disagrees is rejected.
          nullable: true
          example:
            - service: NetSuite
              id: '1234'
          items:
            $ref: '#/components/schemas/GenerateIntegrationIdRequest'
    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
    CreditUnitType:
      type: string
      example: CURRENCY
      enum:
        - CURRENCY
        - METRIC
    Currency:
      type: string
      example: GBP
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - BGN
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - NOK
        - NZD
        - PLN
        - SAR
        - SEK
        - SGD
        - THB
        - USD
        - UYU
        - ZAR
    GrantRefreshFrequency:
      type: string
      example: MONTHLY
      enum:
        - NONE
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    GrantBillingFrequency:
      type: string
      example: MONTHLY
      enum:
        - ONE_TIME
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    RolloverMode:
      type: string
      example: NONE
      enum:
        - NONE
        - ON_GRANT_REFRESH
        - ON_GRANT_REFRESH_AND_PHASE
    GenerateIntegrationIdRequest:
      required:
        - id
        - service
      type: object
      example:
        service: Xero
        id: '123'
      properties:
        service:
          $ref: '#/components/schemas/IntegrationService'
        id:
          type: string
          example: '123'
    ArrCalculation:
      type: string
      example: INCLUDE
      enum:
        - INCLUDE
        - EXCLUDE
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.