POST
/
billing-schedules
curl --request POST \
  --url https://eu.sequencehq.com/api/billing-schedules \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "autoIssueInvoices": false,
  "collectionPaymentProvider": "STRIPE",
  "createAsDraft": false,
  "customerId": "cca32597-b6b0-4499-9669-128aef8702e4",
  "discounts": [
    {
      "amount": 25,
      "discountCalculationType": "PERCENTAGE",
      "message": "Loyalty Discount",
      "priceIds": [
        "e007e884-5100-4183-8355-4771865cb4d7"
      ],
      "separateLineItem": false,
      "validFrom": "2023-01-01",
      "validTo": "2023-01-31"
    }
  ],
  "endDate": "2022-12-01",
  "phases": [
    {
      "endDate": "2022-06-30",
      "priceIds": [
        "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
      ],
      "startDate": "2022-01-01"
    },
    {
      "endDate": "2022-12-31",
      "priceIds": [
        "9fe9986b-e205-42b7-a58f-42845c91f03f"
      ],
      "startDate": "2022-07-01"
    }
  ],
  "purchaseOrderNumber": "PO123",
  "recurrenceDayOfMonth": 1,
  "startDate": "2022-01-01",
  "taxRates": [
    {
      "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
      "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
    }
  ],
  "type": "PHASES"
}'
{
  "archivedAt": "2022-06-28T16:47:00Z",
  "autoIssueInvoices": false,
  "createdAt": "2022-06-28T16:47:00Z",
  "customerId": "cca32597-b6b0-4499-9669-128aef8702e4",
  "endDate": "2022-12-01",
  "firstBillingDate": "2022-02-02",
  "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
  "label": "label",
  "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
  "phases": [
    {
      "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
      "createdAt": "2022-06-28T16:47:00Z",
      "endDate": "2022-06-30",
      "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
      "priceIds": [
        "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
      ],
      "startDate": "2022-01-01"
    }
  ],
  "priceIds": [],
  "prices": [],
  "purchaseOrderNumber": "PO123",
  "recurrenceDayOfMonth": 1,
  "reference": "ref",
  "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
  "startDate": "2022-01-01",
  "status": "ACTIVE",
  "taxRates": [
    {
      "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
      "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
    }
  ],
  "timeTravellerId": "43f3dad8-23b0-4141-8813-4260b86a7ebb",
  "type": "CUSTOM",
  "updatedAt": "2022-06-28T16:47:00Z"
}

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

Body

application/json
  • Option 1

  • Option 2

autoIssueInvoices
boolean
required
collectionPaymentProvider
enum<string>
Available options:
STRIPE,
NONE,
UNRECOGNIZED
createAsDraft
boolean
required
customerId
string
required
discounts
object[]
endDate
string
required
priceIds
string[]
required
purchaseOrderNumber
string
recurrenceDayOfMonth
integer
startDate
string
required
taxRates
object[]
type
enum<string>
required
Available options:
CUSTOM,
PLAN,
PHASES

Response

201 - application/json
archivedAt
string

Archived at

autoIssueInvoices
boolean
required

Auto-issue invoices for this billing schedule

createdAt
string
required

Created at

customerId
string
required

Customer ID

endDate
string
required

End date

firstBillingDate
string

First billing date

id
string
required

Billing Schedule ID

label
string

Optional label

lastInvoiceId
string

ID of the last invoice (if there has been one)

phases
object[]
required

Phases

priceIds
any[]
required

Price IDs

prices
any[]
required

Prices

purchaseOrderNumber
string

Optional purchase order number to be added to invoices

recurrenceDayOfMonth
integer

Recurrence day of month

reference
string

Optional reference to be added to invoices

sequenceAccountId
string
required

Sequence Account ID

startDate
string
required

Start date

status
enum<string>
required
Available options:
DRAFT,
PENDING,
ACTIVE,
SUSPENDED,
CANCELLED,
COMPLETED
taxRates
object[]

Tax Rate for each Product

timeTravellerId
string

Time traveller ID

type
enum<string>
required
Available options:
CUSTOM,
PLAN,
PHASES
updatedAt
string
required

Last updated at