POST
/
billing-schedules
/
validate-taxes
curl --request POST \
  --url https://eu.sequencehq.com/api/billing-schedules/validate-taxes \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "cca32597-b6b0-4499-9669-128aef8702e4",
  "startDate": "2022-01-01",
  "endDate": "2022-12-01",
  "recurrenceDayOfMonth": 1,
  "taxRates": [
    {
      "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
      "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
    }
  ],
  "autoIssueInvoices": false,
  "purchaseOrderNumber": "PO123",
  "paymentProvider": "STRIPE",
  "isDraft": false,
  "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": 0.08,
          "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
}'

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

Sequence-Version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Body

application/json
customerId
string
required

Customer ID

Example:

"cca32597-b6b0-4499-9669-128aef8702e4"

startDate
string
required

Start date

Example:

"2022-01-01"

taxRates
object[]
required

Tax Rate for each Product

Example:
[
  {
    "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
    "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
  }
]
autoIssueInvoices
boolean
required

Auto-issue invoices for this billing schedule

Example:

false

isDraft
boolean
required

Create in draft status

Example:

false

rollUpBilling
boolean
required

Toggles Roll-up billing

Example:

false

phases
object[]
required

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": 0.08,
        "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"
      }
    ]
  }
]
endDate
string

End date. A null end date denotes an open-ended schedule.

Example:

"2022-12-01"

recurrenceDayOfMonth
integer

Recurrence day of month

Example:

1

purchaseOrderNumber
string

Optional purchase order number to be added to invoices

Example:

"PO123"

paymentProvider
enum<string>

Payment provider to set up collection for

Available options:
STRIPE,
NONE
Example:

"STRIPE"

attachmentAssetIds
string[]

IDs of assets that are attached to this schedule

Example:
["5055cd17-d5e8-4286-bddf-79729ddabf51"]
autoCharge
boolean

Automatically collect payments if payment details are available

Example:

true