v1

latestOpenAPI 3.1.02026-07-26580123.9 KB

Create a plan

Create a new plan for a specific product

post/{companyDomain}/products/{productId}/plans

Path parameters

companyDomainstring required

Your companies Billsby subdomain - for example, if you login at widgets.billsby.com, your companyDomain is widgets

productIdinteger required

The unique identifier of the product in the Billsby platform

Request body

namestring

The name of the plan you want to add

displayNamestring

The display name of the plan

descriptionstring

The description of the plan

pricingModelinteger

The type of pricing model for the plan; FlatFee = 1, PerUnit = 2, Reserved = 3, Tiered = 4, Volume = 5, Ranged = 6

featureTagsstring

Any feature tags you want to add to the plan

visibilityinteger

The type of visibility of each plan; public, hidden and on-sale. Available values: 0, 1, 2, 3 (Public=0, Hidden=1, Internal=2, OffSale=3)

redirectUrlstring

The URL you want to redirect your customers to when they have completed the checkout flow

alertEmailstring

The email you would like to receive an alert when a customer signs up for this plan

Response

200

planIdinteger
namestring
displayNamestring
descriptionstring
pricingModelTypeinteger
productIdinteger
featureTagsstring[]
visibilitystring
redirectUrlstring
hasActiveSubscriptionboolean
alertEmailstring

Example response

{
  "planId": 43,
  "name": "Premium Plan",
  "displayName": "The Premium Plan",
  "description": "This plan is our premium experience",
  "pricingModelType": 1,
  "productId": 123,
  "cycles": [
    {
      "cycleId": 2,
      "planId": 2,
      "pricingModel": {
        "frequency": 4,
        "frequencyType": 1,
        "setupFeePrice": 15,
        "setupFeePriceFormatted": "string",
        "billingDateType": 1,
        "proRateOption": 1
      },
      "visibility": "1"
    }
  ],
  "featureTags": [
    "string"
  ],
  "visibility": "public",
  "redirectUrl": "home@mistimail.com",
  "hasActiveSubscription": true,
  "alertEmail": "accounts@mistimail.com"
}