Skip to main content
POST
/
billing-schedules
/
validate-taxes
Validate taxes on a billing schedule
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-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"
  }
}
'
import requests

url = "https://eu.sequencehq.com/api/billing-schedules/validate-taxes"

payload = {
"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" }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'}
})
};

fetch('https://eu.sequencehq.com/api/billing-schedules/validate-taxes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://eu.sequencehq.com/api/billing-schedules/validate-taxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://eu.sequencehq.com/api/billing-schedules/validate-taxes"

payload := strings.NewReader("{\n \"customerId\": \"cca32597-b6b0-4499-9669-128aef8702e4\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-12-31\",\n \"recurrenceDayOfMonth\": 1,\n \"taxRates\": [\n {\n \"priceId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"taxRateId\": \"50c0d53b-8460-41e6-b4e9-a4e157fc1a64\"\n }\n ],\n \"autoIssueInvoices\": false,\n \"purchaseOrderNumber\": \"PO123\",\n \"reference\": \"Example reference\",\n \"label\": \"Example label\",\n \"paymentProvider\": \"STRIPE\",\n \"isDraft\": true,\n \"rollUpBilling\": false,\n \"phases\": [\n {\n \"name\": \"Trial Period\",\n \"priceIds\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-06-30\",\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": 8,\n \"message\": \"8% Discount\",\n \"separateLineItem\": true,\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n },\n {\n \"priceIds\": [],\n \"startDate\": \"2022-07-01\",\n \"endDate\": \"2022-12-31\",\n \"discounts\": [],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n }\n ],\n \"attachmentAssetIds\": [\n \"5055cd17-d5e8-4286-bddf-79729ddabf51\"\n ],\n \"autoCharge\": true,\n \"defaultDueDateDays\": 30,\n \"memo\": \"Example Billing Schedule\",\n \"customFields\": {\n \"key\": \"value\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://eu.sequencehq.com/api/billing-schedules/validate-taxes")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"cca32597-b6b0-4499-9669-128aef8702e4\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-12-31\",\n \"recurrenceDayOfMonth\": 1,\n \"taxRates\": [\n {\n \"priceId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"taxRateId\": \"50c0d53b-8460-41e6-b4e9-a4e157fc1a64\"\n }\n ],\n \"autoIssueInvoices\": false,\n \"purchaseOrderNumber\": \"PO123\",\n \"reference\": \"Example reference\",\n \"label\": \"Example label\",\n \"paymentProvider\": \"STRIPE\",\n \"isDraft\": true,\n \"rollUpBilling\": false,\n \"phases\": [\n {\n \"name\": \"Trial Period\",\n \"priceIds\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-06-30\",\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": 8,\n \"message\": \"8% Discount\",\n \"separateLineItem\": true,\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n },\n {\n \"priceIds\": [],\n \"startDate\": \"2022-07-01\",\n \"endDate\": \"2022-12-31\",\n \"discounts\": [],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n }\n ],\n \"attachmentAssetIds\": [\n \"5055cd17-d5e8-4286-bddf-79729ddabf51\"\n ],\n \"autoCharge\": true,\n \"defaultDueDateDays\": 30,\n \"memo\": \"Example Billing Schedule\",\n \"customFields\": {\n \"key\": \"value\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu.sequencehq.com/api/billing-schedules/validate-taxes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"cca32597-b6b0-4499-9669-128aef8702e4\",\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-12-31\",\n \"recurrenceDayOfMonth\": 1,\n \"taxRates\": [\n {\n \"priceId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"taxRateId\": \"50c0d53b-8460-41e6-b4e9-a4e157fc1a64\"\n }\n ],\n \"autoIssueInvoices\": false,\n \"purchaseOrderNumber\": \"PO123\",\n \"reference\": \"Example reference\",\n \"label\": \"Example label\",\n \"paymentProvider\": \"STRIPE\",\n \"isDraft\": true,\n \"rollUpBilling\": false,\n \"phases\": [\n {\n \"name\": \"Trial Period\",\n \"priceIds\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"startDate\": \"2022-01-01\",\n \"endDate\": \"2022-06-30\",\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": 8,\n \"message\": \"8% Discount\",\n \"separateLineItem\": true,\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n },\n {\n \"priceIds\": [],\n \"startDate\": \"2022-07-01\",\n \"endDate\": \"2022-12-31\",\n \"discounts\": [],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"9fe9986b-e205-42b7-a58f-42845c91f03f\"\n ],\n \"amount\": 100\n }\n ],\n \"listPriceIds\": [\n \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\"\n ],\n \"recurrencePreference\": \"CONTINUE_FROM_PREVIOUS_PHASE\",\n \"phasePriceMetadata\": [\n {\n \"priceId\": \"6dc54805-0ac8-4f17-9341-4d3f2db9dcd8\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ],\n \"phaseListPriceMetadata\": [\n {\n \"listPriceId\": \"45e16eb7-2170-4632-b04f-9ecd90b85b1e\",\n \"arrCalculation\": \"INCLUDE\"\n }\n ]\n }\n ],\n \"attachmentAssetIds\": [\n \"5055cd17-d5e8-4286-bddf-79729ddabf51\"\n ],\n \"autoCharge\": true,\n \"defaultDueDateDays\": 30,\n \"memo\": \"Example Billing Schedule\",\n \"customFields\": {\n \"key\": \"value\"\n }\n}"

response = http.request(request)
puts response.read_body
This response has no body data.
This response has no body data.
This response has no body data.
This response has no body data.

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:

true

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

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

Example:

"2022-12-31"

recurrenceDayOfMonth
integer<int32>

Recurrence day of month

Example:

1

purchaseOrderNumber
string

Optional purchase order number to be added to invoices

Example:

"PO123"

reference
string

Optional reference to be added to invoices

Example:

"Example reference"

label
string

Optional label

Example:

"Example label"

paymentProvider
enum<string>

Payment provider to set up collection for

Available options:
STRIPE,
GOCARDLESS,
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

defaultDueDateDays
integer

Default number of days between invoice issue date and due date. Overrides any invoice level set default due date

Example:

30

memo
string

Billing schedule memo. Overrides any invoice level set memo

Example:

"Example Billing Schedule"

customFields
object

Custom key-value fields for this billing schedule

Example:
{ "key": "value" }

Response