Integrate with Fusebill's API to Automate Invoices, Payments and Collections

Dive into our comprehensive Documentation, API Reference and Tutorials to start working with the Fusebill Subscription Billing platform. Connect easily with Fusebill support to help get your integrations to market as quickly and as seamlessly as possible.

Get Started
 

Overview

The Fusebill API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors.

Fusebill Sandbox Account

Before you do anything, you should work with your implementation specialist to get a sandbox account. One will be used during the initial implementation process, so a member of your team should already have access to it.

Example Requests

Sample API calls are provided next to each method using cURL, a common command line tool for performing HTTP requests. All you need to do is drop in your specific parameters, and you can test the calls from the command line. If the command line isn’t your preference, a great alternative is POSTMAN, an easy-to-use tool for working with a REST API. Additionally, there are usage examples in C# and Python, and sample JSON payloads where relevant.

Sample workflows and tutorials walking you through common use cases and best practices are also available.

Fusebill uses the Fusebill API

In order to ensure our API serves the needs of our customers and is a pleasure for developers to use, the development team at Fusebill builds all of our account and customer-facing applications using the Fusebill API.

We want to ensure our API has a stable interface and performs well under the stresses of real-world use. To ensure we provide the best possible solutions to integrators, we first launch features against a private API resource. As we become confident in the interface and performance stability of these new resources, they may be made available through the Fusebill API.

Suggest Edits

Resources

 

API Resources URLs

The base URL for all Fusebill API calls is secure.fusebill.com. To this base you would append the URLs described in this documentation.

Example

GET secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0 will return the list of up to 100 customers from your production account.

Some users may have older Fusebill testing environments that are accessed via stg-admin.fusebill.com instead of the regular admin.fusebill.com.

In the case where you are working out of one of these accounts, the base API URL is stg-secure.fusebill.com/v1/ instead of secure.fusebill.com/v1

Resource URLs

Many of the Fusebill API resource URLs are structured in a limited hierarchy. There are a number of parent URLs followed by a number of child URLs. The child URLs return a list of child resources. Individual resources in this list are then accessed at parent URLs.

Example

GET secure.fusebill.com/v1/customers returns a list of customers
GET secure.fusebill.com/v1/customers/{id} returns a single customer
GET secure.fusebill.com/v1/customers/{id}/subscriptions returns a list of all subscriptions belonging to the customer
GET secure.fusebill.com/v1/subscriptions/{id} returns a single subscription

Each resource contains a URI that can be used to access it. We recommend following the URIs in the resources as opposed to hard coding URLs because it reduces the amount of work necessary to integrate and keep URL structure decoupled from your implementation.

Suggest Edits

Authentication and Identification

 

Authenticate your account when using the API by including your secret API key in the request. You can manage your API key in Fusebill's UI. Your API key carries many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such GitHub or client-side code.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value -H "Authorization: Basic YourAPIKeyHere" \. You do not need to provide a password.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail. TLS 1.2 is supported, and HTTP compression is encouraged.

Since most PUT, PATCH, and POST requests require a JSON body, API calls will often require an additional header -H Content-Type: application/json to indicate the JSON content.

Optionally, the special header -H "x-audit-source: customString" \ can be used to identify the source of the API call. When looking at the audit log report in the UI, any entry for a change via API will be marked as having the source "API" unless this header is used to override that string to something more useful. For example, if the API calls are coming from a registration page you can set x-audit-source to "API - Registration Page". This is the audit log as seen through the UI:

Error Messages

Fusebill uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with Fusebill's servers (these are rare). Basic codes below.

Error Code
Detail

200 - OK

Everything worked as expected

400 - Bad Request

The request could not be understood by the server due to malformed syntax. The client should not repeat the request without making appropriate changes

401 - Unauthorized

Missing or invalid authorization.

Check your API Key and which environment the call is being made against.

404 - Not Found

The requested resource could not be found. Verify the endpoint in use, or the resource ID provided.

409 - Conflict

The format is valid but the request fails business rules. For example - activating a subscription that is already active

429 - Too Many Requests

API Rate limit has been exceeded.

500 - Server Error

System error with Fusebill API

Note

Not all errors map cleanly onto HTTP response codes, however, when a request is valid but does not complete successfully (e.g., a creating a customer), we return a 4xx error code.

Handling Errors

Our API libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions

Example Error Response
{
   "ErrorId":0,
   "HttpStatusCode":400,
   "Errors":[
      {
         "Key":"Api Error",
         "Value":"Authorization key is not in the correct format."
      }
   ]
}
Suggest Edits

Rate Limits

 

The Fusebill API is rate-limited under the following default constraints:

For live accounts:

  • Maximum of 1,000 requests per minute
  • Maximum of 180,000 requests per day

For Sandbox accounts:

  • 50 requests per minute
  • 5000 requests per day

For TestDrive accounts:

  • 10 Requests per minute
  • 500 Requests per day

If either one of these maximums has been reached, an HTTP 429 error will be returned.
The body of the error will indicate which limit.

With each call to the API, limit and usage information will be returned in the headers of the response.

Header
Type
Description

X-Rate-Limit-Limit-Minute

Integer

The maximum number of requests you can make in a given minute

X-Rate-Limit-Remaining-Minute

Integer

The remaining number of requests you can make for the given minute

X-Rate-Limit-Reset-Minute

Timestamp

The timestamp indicating when the next minute starts. At this timestamp X-Rate-Limit-Remaining-Minute is set to equal X-Rate-Limit-Limit-Minute

X-Rate-Limit-Limit-Day

Integer

The maximum number of requests you can make in a given day

X-Rate-Limit-Remaining-Day

Integer

The remaining number of requests you can make for the given day

X-Rate-Limit-Reset-Day

Timestamp

The timestamp indicating when the next day starts. At this timestamp X-Rate-Limit-Remaining-Day is set to equal X-Rate-Limit-Limit-Day

Suggest Edits

Pagination

 

For API requests that return a list, Fusebill limits the maximum number of returned JSON entities. This is a maximum threshold that varies from entity type to entity type but is never below 1,000. For reading a large list of entities, the query string parameters pageNumber and pageSize can be used to paginate the results.

Example

Read the start of the list:

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0

This request would read the first 100 customers.

Continue reading the list

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=1

And that request would read the next page of 100 customers

Custom Pagination Headers

To make pagination easier, there are special custom headers Fusebill sends as part of the HTTPS response. These allow for simple programmatic reading of the list.

Header
Type
Description

X-NextPage

Integer

Number of the next available page

X-Count

Integer

The total number of results that match the search criteria. This can be used to deduce how many entities match the search criteria if filtering is being used

X-MaxCount

Integer

Total number of results

X-CurrentPage

Integer

Number of the current page

X-PreviousPage

Integer

Number for the previous page. -1 indicates there is no previous page

X-PageSize

Integer

Maximum number on the current page

X-MaxPageIndex

Integer

Number of the Last page

X-SortOrder

String

Orientation the list is sorted by (Ascending or Descending)

X-SortExpression

String

The object field being sorted on

Suggest Edits

String Filtering

 

For API requests that return a list, Fusebill can filter the results based on given criteria. This is done through a specific query string parameter called query which can be used for field value matching.

Examples

A: Simple matching on one field

GET https://secure.fusebill.com/v1/customers?pageSize=1&pageNumber=0&query=firstName:Jessica

This call returns up to 1 customer entity with the firstName “Jessica”. The colon character separates the query parameter name from the value being matched against. The available query parameter names are often the same as the field names in the response JSON. These query parameter names are provided in this API reference for the relevant calls.

B: Simple matching on two fields

GET https://secure.fusebill.com/v1/customers?pageSize=1&pageNumber=0&query=firstName:Jessica;lastName:Smithson

This call returns up to 1 customer entity with the firstName “Jessica” and the lastName “Smithson”. The semicolon separates the filter-value pairs

C: Special value matching (null)

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=reference:[empty]

This call returns up to 100 customer entities with no value for reference. This is useful if there is a need to ensure no customers are without a custom value for reference. “[empty]” is a special string used to check if a string field is null or empty, since “null” would be interpreted as a string.

D: Partial matching

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=primaryPhone:555*

This call returns up to 100 customer entities such that the value of their primaryPhone field starts with area code 555. The asterisk simply means to accept 0 to infinity additional characters, and more than one asterisk can be used. If the query string were query=primaryPhone:*555* then phone numbers like “5556780987”, “4555671234”, and “2504741555” would all count as matches.

E: Set matching on enum fields

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=status:Active,Draft

The comma allows for multiple conditions. This call will return up to 100 customers with status equal to “Active” or “Draft”. Comma separating values is supported only on enum type fields like status

F: Set matching on IDs

GET https://secure.fusebill.com/v1/customers?query=id:123,456,789

The comma separates different values. This call will return customers with ID values in the set {123, 456, 789}. This can be used with certain other Integer type fields like invoiceDay on the (v1/subscriptions/getAll)[https://developer.fusebill.com/reference#list-subscriptions-1] endpoint

G: special character matching

GET https://secure.fusebill.com/v1/customers?pageSize=1&pageNumber=0&query=reference:am%26per%26sand

This call returns up to 1 customer entities with the value of reference equal to "am&per&sand". Since the ampersand character is used to separate query strings, its inclusion in the URL would be problematic. Similar problems would occur if a comma character were used. To solve this issue, the URL encoding for these characters must be used explicitly.

Suggest Edits

DateTime/Numeric Filtering

 

For API requests that return a list, Fusebill can filter the results based on given criteria. This is done through a specific query parameter called query which can be used for date range filtering and numeric range filtering. All times shown and used in the Fusebill API are UTC

Examples

A: Simple closed interval (date range)

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=createdTimestamp:2018-01-01|2019-01-01

This call returns up to 100 customers who were created in the system during 2018. The colon character separates the query parameter name from the range being used. The available query parameter names are often the same as the field names in the JSON. These query parameter names are provided in the API reference for the relevant calls.
The pipe character is used to separate the lower time bound from the upper time bound.

A note on formatting:
The format for a timestamp is YYYY-MM-DD but more granularity can be used e.g. YYYY-MM-DDTHH:mm:SS. In fact, when a range like 2018-01-01|2019-01-01 is provided Fusebill automatically translates that into 2018-01-01T00:00:00|2019-01-01T00:00:00 which is why the range would include timestamps that occurred on 2018-01-01 but not 2019-01-01.

B: Lower bounded interval (date range)

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=modifiedTimestamp:2018-01-01|

This call returns up to 100 customers with a last modified timestamp of January 1st 2018 or beyond.

C: Upper bounded interval (date range)

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=createdTimestamp:|2019-01-01

This call returns up to 100 customers created before 2019-01-01.

D: Numeric ranges

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=monthlyRecurringRevenue:50.00|180.00

This call returns up to 100 customers with a monthly recurring revenue between 50.00 and 180.00
As with date ranges, that range could be |180.00 to be values from negative infinity to 180.00 or it could be 50.00| to be values from 50.00 to infinity

E Combining ranges

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&query=monthlyRecurringRevenue:50.00|180.00;modifiedTimestamp:|2020-01-01

This call returns up to 100 customers who satisfy both conditions. They must have a monthly recurring revenue between 50.00 and 180.00, and their last modified timestamp must be before 2020-01-01. The semicolon (;) is used to separate the filter-value pairs. The semicolon can also be used to combine range filtering and string filtering in the same API call.

 

For API requests that return a list, Fusebill can sort the array of JSON objects as a part of the request. The two query string parameters used for this are sortOrder and sortExpression. When using a custom sort scheme, both query string parameters must be provided in the URL.

Example: sort on time

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&sortOrder=Descending&sortExpression=createdTimestamp

This call returns 100 customer entities ordered from the most recently created to the 100th most recently created customer. sortOrder is an enum that can be either “Ascending” or “Descending”. sortExpression is a query parameter name. Any query parameter name that can be used for string matching or date filtering can be used for sortExpression.

Example: sort on string

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0&sortOrder=Ascending&sortExpression=firstName

This call returns 100 customer entities sorted by the lexicographical order of the firstName field. Lexicographical order for a string field goes from null to digits to letters. This would be an ascending order of strings: null, “123”, “234”, “alpha”, “bravo”...

You can verify what's being sorted on by checking the custom response headers X-SortOrder and X-SortExpression

Suggest Edits

Customer Object

The customer object is a basic customer record in the Fusebill system. It includes the Fusebill generated ID that is used to uniquely identify the particular customer throughout the system.

A customer represents a billed entity in Fusebill. It is associated with a list of subscription objects, payment method objects, invoice objects, and many other objects in the system. Directly associated with the customer object is the customer's basic contact information. If you have your own custom IDs for your customers it may be useful to leverage the reference field (in the UI this is called "Customer ID" by default) for easy navigation through your customer base. Keep in mind that reference is a custom string that Fusebill does not enforce uniqueness for. Only the Fusebill generated id is guaranteed to be unique across your customer base as well as non-null values for portalUserName.

 

Customer Object Fields

Property
Type
Description

firstName

String

The first name of the Customer.

[Max Length: 50 characters]

middleName

String

The middle name of the Customer.

[Max Length: 50 characters]

lastName

String

The last name of the Customer.

[Max Length: 50 characters]

companyName

String

The company name associated with this Customer.

[Max Length: 50 characters]

suffix

String

The name suffix of the customer, for example Jr. or Sr.

[Max Length: 50 characters]

primaryEmail

String

The primary contact email for the Customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". Invoices and other email communications will be sent to this address(es).

[Max Length: 255 characters]

primaryPhone

String

The primary contact number for the Customer.

[Max Length: 50 characters]

secondaryEmail

String

The secondary contact email for the Customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". No communications are sent to this address

[Max Length: 255 characters]

secondaryPhone

String

The secondary contact number for the Customer.

[Max Length: 50 characters]

title

Enum:{Mr, Mrs, Ms, Miss, Dr}

The prefix-title of the customer.

reference

String

This is a free form reference field where you can store a reference string for this customer. Generally, this is used to store the reference/Id of this customer in some external system to facilitate matching up the Fusebill Customer record to that system.

[Max Length: 255 characters]

status

Enum:{Draft, Active, Hold, Suspended, Cancelled}

The status of the customer. Most actions that can be done with this entity require it to be in active status

customerAccountStatus

Enum:{Good, Collection, PoorStanding}

The accounting status of the Customer. This reflects the financial status of the Customer and relates to if the Customer has past-due unpaid invoices. Customers enter Poor Standing if they have at least one (1) unpaid, overdue invoice. .

[Read Only]

currency

3 character ISO currency code

The Currency configured for this Customer.
[Read Only]

customerReference

Object (defined below)

This is used to store additional data related to this customer, including sales tracking codes.

customerAcquisition

Object (defined below)

This is used to store different details about how this customer was acquired. Generally, this is used to store marketing channel information.

monthlyRecurringRevenue

Decimal

The calculated MRR value for this Customer. This is calculated based on the expected income of thier current Subscriptions. Only recurring charges are included in this calculation. One-time goods and physical goods purchases, which do not recur, are not included.

[Read Only]

netMonthlyRecurringRevenue

Decimal

The net MRR of the customer. Calculated by considering any discounts on the customer's active subscription products.

[Read Only]

salesforceId

String

The Salesforce Account Id associated with this Customer. This field is only populated if you are using the Fusebill Salesforce plugin.

salesforceAccountType

Enum: {Company, Person}

This will dictate how the Salesforce account name will be created. Your options are:
1)"Company" where the company name and Fusebill Id will be combined and used as the account name
2)"Person" where the first and last names will be combined to populate the account name field.
3) NULL, the account level default will be used

salesforceSynchStatus

Enum:{Enabled, Disabled}

This setting controls if the account will synchronize the Fusebill account with Salesforce.

[Read Only]

netsuiteId

String

If you are using a Netsuite integration this is the number which uniquely identifies the customer in Netsuite.

[Read Only]

netsuiteSynchStatus

Enum:{Enabled, Disabled}

This setting controls if the account will synchronize the Fusebill account with NetSuite.

[Read Only]

netsuiteCustomerType

Enum:{Individual, Company}

Identifies the entity type of the customer record in NetSuite.
This field is only populated if you are using the Fusebill NetSuite plugin.

[Read Only]

portalUserName

String

If the customer has login credentials this field contains the username.
[Max Length: 50 characters]
[Read Only After Set]

parentId

Integer

The Parent ID relates to the Fusebill hierarchy feature. If hierarchy is enabled, this is the id of the parent customer.​

quickBooksLatchType

Enum:{CreateNew, LatchExisting, DoNothing}

Indicates how Fusebill is handling latching for this customer object and the possible corresponding customer in QuickBooks Online. This is for the QuickBooks Online plugin.

quickBooksId

Integer

The name ID of this customer in QuickBooks Online. For the QuickBooks Online plugin.

hubSpotId

Integer

The ID of this customer in HubSpot

hubSpotCompanyId

Integer

The ID of this customer in HubSpot if it represents a company

modifiedTimestamp

Timestamp

The timestamp of the last time this object was modified.

[Read Only]

id

Integer

The Fusebill generated ID that uniquely identifies this customer.

[Read Only]

uri

String

Full path to a particular customer object.

[Read Only]

Customer Reference Fields

Property
Type
Description

reference1

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference2

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference3

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

salesTrackingCodes

Object (defined below)

A collection of up to 5 SalesTrackingCode objects

SalesTrackingCode Fields

Property
Type
Description

type

String

Identification of the sales tracking code type being set. The sales tracking code type can be configured under the sales tracking code section under your account settings

By default the accepted values are "Sales Tracking Code 1", "Sales Tracking Code 2" ... up to "Sales Tracking Code 5".

If you rename your sales tracking code, those names or the default names can be used.

[Max Length: 255 characters]

code

String

The specific sales tracking code value. The code must exist under the appropriate salestrackingcode type being referenced

[Max Length: 255 characters]

name

String

Display name

[Max Length: 255 characters]

id

Integer

The Fusebill generated ID for the Sales Tracking Code

[Read Only]

uri

String

The full path to the Sales Tracking Code object

[Read Only]

Customer Acquisition Fields

Property
Type
Description

adContent

String

Typically used to set the content description for the campaign ad. For all campaigns, or for a particular campaign, this appears as Ad Content under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

campaign

String

This variable is used to define the name of your campaign, which appears in the Analytics reports on the top-level campaign report.

[Max Length: 255 characters]

keyword

String

These are the words that visitors use to find your Website when using a search engine. Google Analytics provides a list of keywords that have been searched by users who find your Website. This information shows you what searchers are actually looking for when they find your Website. This also allows you to discover potential new keywords to target.

[Max Length: 255 characters]

landingPage

String

The first page a visitor views during a session; also known as the entrance page.

[Max Length: 255 characters]

medium

String

Typically used to define the type of the campaign, such as a banner ad, email campaign, or click ad. For all campaigns, or for a particular campaign, this appears as Keyword under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

source

String

The source variable is typically used to define where the campaign is originating from, such as a website name or a company. For all campaigns, or for a particular campaign, this appears as Source under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

id

Integer

The Fusebill generated ID for the customer this customer acquisition belongs to

[Read Only]

uri

String

The full path to the customer object this customer acquisition belongs to

[Read Only]

Suggest Edits

List Customers

This function is used to retrieve a list of customer objects.

In order to manage the size of the data returned it is strongly recommended that pagination is used.

 
gethttps://secure.fusebill.com/v1/customers/?query=parameterName:value&pageSize=100&pageNumber=0
 

This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value

Parameter Name
Acceptable Values
Parameter name
Acceptable Values

AccountStatus

Good, PoorStanding, Collection

FirstName

String

Arbalance

Decimal Range

HubSpotId

Integer

CompanyName

String

LastName

String

CreatedTimestamp

Date Range

MiddleName

String

CurrencyId

Integer (1-24)*

ModifiedTimestamp

Date Range

CurrentMrr

Decimal Range

MonthlyRecurringRevenue

Decimal Range

CurrentNetMrr

Decimal Range

NetMRR

Decimal Range

CustomerAcquisition.AdContent

String

NetsuiteEntityType

Integer (1-2)**

CustomerAcquisition.Campaign

String

NetSuiteId

String

CustomerAcquisition.LandingPage

String

NetSuiteSynchStatusId

Enabled, Disabled

CustomerAcquisition.Medium

String

ParentId

Integer

CustomerAcquisition.Source

String

PrimaryEmail

String

CustomerReference.Reference1

String

PrimaryPhone

String

CustomerReference.Reference2

String

QuickBooksId

Integer

CustomerReference.Reference3

String

QuickBooksLatchTypeId

CreateNew, LatchExisting, DoNothing

CustomerReference.SalesTrackingCode1.Code

String

QuickBooksSyncToken

Integer

CustomerReference.SalesTrackingCode1.Name

String

Reference

String

CustomerReference.SalesTrackingCode2.Code

String

SalesforceAccountType

Company, Person

CustomerReference.SalesTrackingCode2.Name

String

SalesforceId

String

CustomerReference.SalesTrackingCode3.Code

String

SalesforceSynchStatus

Enabled, Disabled

CustomerReference.SalesTrackingCode3.Name

String

SecondaryEmail

String

CustomerReference.SalesTrackingCode4.Code

String

SecondaryPhone

String

CustomerReference.SalesTrackingCode4.Name

String

Status

Draft, Active, Cancelled, Hold, Suspended

CustomerReference.SalesTrackingCode5.Code

String

Suffix

String

CustomerReference.SalesTrackingCode5.Name

String

Title

Mr, Mrs, Ms, Miss, Dr

*See here for Fusebill currency codes
**The NetsuiteEntityType is 1 for “Customer – Individual” and 2 for "Customer – Company”
This call supports Pagination (Read More)
&pageSize=100&pageNumber=0 Max Page Size 10,000
This call supports Sorting Read More
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Example
curl -X GET "https://secure.fusebill.com/v1/customers?query=firstName:John" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//Query String
string queryString = "firstName:john";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/customers/?query="+queryString);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";      
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://stg-secure.fusebill.com/v1/customers?query=firstName:John', headers=headers)
print(r.content)
Response
[
  {
    "firstName": "Bowen",
    "middleName": "Laurie",
    "lastName": "Rosales",
    "companyName": "Manglo",
    "suffix": "Jr.",
    "primaryEmail": "[email protected]",
    "primaryPhone": 9454323791,
    "secondaryEmail": "[email protected]",
    "secondaryPhone": 8784522075,
    "title": "Dr",
    "reference": 100986,
    "status": "Active",
    "customerAccountStatus": "Good",
    "currency": "USD",
    "customerReference": {
      "reference1": null,
      "reference2": "customValue",
      "reference3": null,
      "salesTrackingCodes": [],
      "id": 12000750,
      "uri": "https://secure.fusebill.com/v1/customers/12000750"
    },
    "customerAcquisition": {
      "adContent": null,
      "campaign": null,
      "keyword": null,
      "landingPage": null,
      "medium": null,
      "source": null,
      "id": 12000750,
      "uri": "https://secure.fusebill.com/v1/customers/12000750"
    },
    "monthlyRecurringRevenue": 250,
    "netMonthlyRecurringRevenue": 220,
    "salesforceId": 12345678,
    "salesforceAccountType": null,
    "salesforceSynchStatus": "Enabled",
    "netsuiteId": 12345678,
    "netsuiteSynchStatus": "Enabled",
    "netsuiteCustomerType": "Individual",
    "portalUserName": "Bowen1974",
    "parentId": 12000749,
    "quickBooksLatchType": null,
    "quickBooksId": null,
    "quickBooksSyncToken": null,
    "hubSpotId": null,
    "hubSpotCompanyId":null,
    "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  }
]
//if a malformed query string is used:
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Bad request, the query is not valid.  Please check your request and try again."
        }
    ]
}
Suggest Edits

Read Customer Overview

This resource is used to retrieve a short form customer object with some additional payment and account balance information. This is ideal for quickly checking if a customer has an unpaid balance, has a credit, or pending charges.

 
gethttps://secure.fusebill.com/v1/customers/customerId/overview
 

Path Parameters

Property
Type
Description

customerId

Integer

This is the the Id value which uniquely identifies this Customer record in the Fusebill system. This value is unique to each customer.

Examples
curl -X GET "https://secure.fusebill.com/v1/customers/{id}/Overview" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//Path parameter, Fusebill Id which corresponds to the customerId 
int pathParameter = {customerId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/customers/"+pathParameter+"/Overview");
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://stg-secure.fusebill.com/v1/customers/{id}/overview', headers=headers)
print(r.content)
Response
{
  "title": "Dr",
  "firstName": "Foreman",
  "middleName": "Mai",
  "lastName": "Travis",
  "suffix": "Jr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 9934643454,
  "companyName": 9984242269,
  "reference": 100986,
  "createdTimestamp": "2019-11-06T14:19:01",
  "status": "Active",
  "customerAccountStatus": "Good",
  "pendingCharges": 0,
  "arBalance": 0,
  "unallocatedPayments": 0,
  "unallocatedCredits": 0,
  "unallocatedOpeningBalance": 0,
  "currency": "USD",
  "daysUntilSuspension": 0,
  "daysUntilCancellation": 0,
  "customerAccountStatusTimestamp": "2019-11-06T14:19:01",
  "statusTimestamp": "2019-11-06T14:19:01",
  "lifetimeValue": 0,
  "monthlyRecurringRevenue": 0,
  "netMonthlyRecurringRevenue": 0,
  "nextBillingDate": null,
  "salesforceSynchStatus": "Enabled",
  "salesforceId": null,
  "quickbooksId": null,
  "netsuiteId": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "parentId": null,
  "parentName": null,
  "isParent": false,
  "unknownPaymentActivityId": null,
  "id": 650084,
  "uri": "https://secure.fusebill.com/v1/CustomerOverview/650084"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "CustomerOverview with id 2 not found."
        }
    ]
}
Suggest Edits

Read Customer

This function is used to retrieve a customer object. Specify the unique Fusebill ID of the customer in your request.

 
gethttps://secure.fusebill.com/v1/customers/customerId
 

Path Parameters

Property
Type
Description

customerId

integer

This is the id value which uniquely identifies a Customer record in the Fusebill system. This value is unique to each customer.

Examples
curl -X GET "https://secure.fusebill.com/v1/customers/{customerId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//query parameter
int queryParameter = {customerId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/customers/"+queryParameter);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://stg-secure.fusebill.com/v1/customers/183365', headers=headers)
print(r.content)
Response
{
  "firstName": "Shields",
  "middleName": "Payne",
  "lastName": "Gillespie",
  "companyName": "Cuizine",
  "suffix": "Jr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 8784473067,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 8955793436,
  "title": "Dr",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Shields1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 2 not found."
        }
    ]
}
Suggest Edits

Create Customer

This function is used to create a new customer entity.

A successful result will return the id of the customer, otherwise known as the Fusebill ID. We recommend that you latch this unique ID into any system integrating with Fusebill.

It is possible to create a blank customer with no information, although we strongly recommend using at least some combination of firstName, lastName, comanyName, and primaryEmail as a bare minimum.

 
posthttps://secure.fusebill.com/v1/customers
 

If your account is configured to use more than one currency, you must specify the currency of the customer at the time of creation.

  • If no value is set, the account default will be used.
  • This value can not be edited after the customer has been created.
  • A customer can only have one currency.

Sample Requests

POST https://secure.fusebill.com/v1/customers
// Basic example to create a customer with a first/last name, company name, and email

{
    "firstName": "John",
    "lastName": "Smith",
    "companyName": "Fusebill",
    "primaryEmail": "[email protected]"
}


POST https://secure.fusebill.com/v1/customers
// This example will post a customer, and override some accounts level billing settings

{
  "firstName": "Bob",
  "companyName": "Fusebill",
  "billingSetting": [
    {
      "term": "Net30",
      "autoCollect": true,
      "rechargeType": "",
      "rechargeThresholdAmount": null,
      "rechargeTargetAmount": null,
      "statusOnThreshold": null,
      "autoPostDraftInvoice": true,
      "customerGracePeriod": 30,
      "gracePeriodExtension": null,
      "standingPoNumber": "PO#123",
      "acquisitionCost": 200,
      "showZeroDollarCharges": false,
      "taxExempt": true,
      "taxExemptCode": 123,
      "useCustomerBillingAddress": true,
      "avalaraUsageType": "",
      "vatIdentificationNumber": "",
      "customerServiceStartOption": "",
      "rollUpTaxes": null,
      "rollUpDiscounts": null
    }
  ],
  "trackedItemDisplay": [
    {
      "trackedItemDisplayFormat": null,
      "showTrackedItemName": null,
      "showTrackedItemReference": null,
      "showTrackedItemDescription": null,
      "showTrackedItemCreatedDate": null
    }
  ]
}
POST https://secure.fusebill.com/v1/customers
// This example will post a customer with basic contact details, reference data, acquisition data, Salesforce/Quickbooks ID's, and a billing address

{  
   "firstName":"Trev",
   "middleName":null,
   "lastName":"Smith",
   "companyName":"Fusebill",
   "suffix":"text",
   "primaryEmail":"[email protected]",
   "primaryPhone":"123-456-7890",
   "secondaryEmail":"[email protected]",
   "secondaryPhone":"123-456-7890",
   "title":"Dr",
   "currency":"USD",
   "customerReference":{  
      "reference1":"google",
      "reference2":null,
      "reference3":"linkedIn",
      "salesTrackingCodes":[  

      ]
   },
   "customerAcquisition":{  
      "adContent":null,
      "campaign":null,
      "keyword":null,
      "landingPage":null,
      "medium":null,
      "source":null
   },
   "salesforceId":null,
   "salesforceAccountType":null,
   "salesforceSynchStatus":"Enabled",
   "portalUserName":"portal9000",
   "parentId":null,
   "quickBooksLatchType":null,
   "quickBooksId":null,
   "quickBooksSyncToken":null,
   "billing":{  
      "companyName":"Fusebill",
      "line1":"109 Old House Street",
      "line2":"Suite 17",
      "city":"Sittsville",
      "postalZip":"12345",
      "country":"CA",
      "state":"NY"
   },

}
POST https://secure.fusebill.com/v1/customers
// This customer will use a different currency 
// They also have separate billing & shipping addresses defined 

{  
   "firstName":"John",
   "lastName":"Smith",
   "companyName":"Fusebill",
   "primaryEmail":"[email protected]",
   "currency":"CAD",
   "billing":{  
      "companyName":"Billing Company",
      "line1":"109 Old House Street",
      "line2":"Suite 17",
      "city":"Sittsville",
      "postalZip":"12345",
      "country":"CA",
      "state":"NY"
   },
   "shipping":{  
      "companyName":"Shipping Company",
      "line1":"109 Old House Street",
      "line2":"Suite 17",
      "city":"Sittsville",
      "postalZip":"12345",
      "country":"CA",
      "state":"NY"
   }
}

Request Parameters

Property
Type
Description
Required

username

String

The username of the customer if they have login credentials [Read Only After Set; Max Length: 50 characters]

Optional

firstName

String

The first name of the customer.

[Max Length: 50 characters]

Optional

middleName

String

The middle name of the customer.

[Max Length: 50 characters]

Optional

lastName

String

The last name of the customer.

[Max Length: 50 characters]

Optional

companyName

String

The company name associated with this customer.

[Max Length: 50 characters]

Optional

suffix

String

The name suffix of the customer, for example Jr. or Sr.

[Max Length: 50 characters]

Optional

primaryEmail

String

The primary contact email for the customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". Invoices and other email communications will be sent to this address(s).

[Max Length: 255 characters]

Optional

primaryPhone

String

The primary contact number for the Customer.

[Max Length: 50 characters]

Optional

secondaryEmail

String

The secondary contact email for the customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". No communications are sent to this address

[Max Length: 255 characters]

Optional

secondaryPhone

String

The secondary contact number for the customer.

[Max Length: 50 characters]

Optional

title

Enum:{Mr, Mrs, Ms, Miss, Dr}

The prefix-title of the customer.

Optional

reference

String

This is a free form reference field where you can store a reference string for this customer. Generally, this is used to store the reference/Id of this Customer in some external system to facilitate matching up the Fusebill Customer record to that system.

[Max Length: 255 characters]

Optional

currency

3 Character ISO Currency code

The Currency configured for this Customer. If nothing is specified the account default is used

Optional

customerReference

Object (defined below)

This is a collection of key-value pairs. Each can be used to store additional data related to this Customer including sales tracking codes.

Optional

customerAcquisition

Object (defined below)

This is a collection of Strings. Each can be used to store different details about how this Customer was acquired. Generally, this is used to store marketing channel information.

Optional

billingSetting

Object (defined below)

Customer billing settings.

Optional

shipping

Object (defined below)

Customer shipping address.

Optional

billing

Object (defined below)

Customer billing address.

Optional

addressPreference

Object (defined below)

Set address preferences

Optional

monthlyBillingPeriodConfiguration

Object (defined below)

Monthly billing period definition for the customer.

Optional

yearlyBillingPeriodConfiguration

Object (defined below)

Annual billing period definition for the customer.

Optional

salesforceId

String

The Salesforce Account Id associated with this Customer.

Optional

salesforceAccountType

Enum:{Company, Person}

This will dictate how the Salesforce account name will be created. Your options are:
1)"Company" where the company name and Fusebill ID will be combined and used as the account name
2)"Person" where the first and last names will be combined to populate the account name field.
3) Null, the (Fusebill) account level default will be used

Optional

salesforceSynchStatus

Enum: {Enabled, Disabled}

This setting controls if the account will synchronize the Fusebill customer with Salesforce.

Optional

netsuiteId

String

If you are using a Netsuite integration this is the number which uniquely identifies the customer in Netsuite.

Optional

netsuiteSynchStatus

Enum:{Enabled, Disabled}

This setting controls if the account will synchronize the Fusebill customer with NetSuite.

Optional

parentId

Integer

The Parent ID relates to the Fusebill hierarchy feature. If hierarchy is enabled, this is the id of the parent customer.​

Optional

quickBooksId

Integer

The name ID of this customer in QuickBooks Online. For the QuickBooks Online plugin.

Optional

quickBooksLatchType

Enum:{CreateNew, LatchExisting, DoNothing}

Indicates how Fusebill is handling latching for this customer object and the possible corresponding customer in QuickBooks Online. This is for the QuickBooks Online plugin.

Optional

hubSpotId

Integer

The ID of this customer in HubSpot

Optional

hubSpotCompanyId

Integer

The ID of this customer in HubSpot if it represents a company

Optional

lifetimeValue

Decimal

The lifetime value of the customer. Typically set to a negative number representing the on-boarding cost of the customer. As the customer pays charges over time, this will increase and thus show how much the customer has contributed to revenue.

Optional

Customer Billing/Shipping Address

Property
Type
Description

companyName

String

The company name if applicable.
[Max Length: 255 characters]

line1

String

standard line 1 of an address.
[Max Length: 60 characters]

line2

String

standard line 2 of an address.
[Max Length: 60 characters]

city

String

The city name.
[Max Length: 50]

postalZip

String

The postal code or zip code.
[Max Length: 10]

country

String

Country using 2-character ISO code

state

String

State using 2-character ISO code

Customer Reference Fields

Property
Type
Description

reference1

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference2

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference3

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

salesTrackingCodes

Object (defined below)

A collection of up to 5 SalesTrackingCode objects

SalesTracking Code Fields

Property
Type
Description

type

String

The category name this code falls under. Fusebill supports 5 distinct categories. By default the names are "Sales Tracking Code 1", "Sales Tracking Code 2",..."Sales Tracking Code 5" but they can be customized.

If you rename your Sales Tracking code, those names or the default names can be used.

code

String

The specific sales tracking code value. The code must exist under the appropriate sales tracking code type being referenced

Customer Acquisition Fields

Property
Type
Description

adContent

String

Typically used to set the content description for the campaign ad. For all campaigns, or for a particular campaign, this appears as Ad Content under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

campaign

String

This variable is used to define the name of your campaign, which appears in the Analytics reports on the top-level campaign report.

[Max Length: 255 characters]

keyword

String

These are the words that visitors use to find your Website when using a search engine. Google Analytics provides a list of keywords that have been searched by users who find your Website. This information shows you what searchers are actually looking for when they find your Website. This also allows you to discover potential new keywords to target.

[Max Length: 255 characters]

landingPage

String

The first page a visitor views during a session; also known as the entrance page.

[Max Length: 255 characters]

medium

String

Typically used to define the type of the campaign, such as a banner ad, email campaign, or click ad. For all campaigns, or for a particular campaign, this appears as Keyword under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

source

String

The source variable is typically used to define where the campaign is originating from, such as a website name or a company. For all campaigns, or for a particular campaign, this appears as Source under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

Customer BillingSetting

Property
Type
Description

term

Enum:{Net0, Net5, Net7, Net10, Net15, Net21, Net30, Net45, Net60, Net75, Net90, MFI1}

This defines the Payment Terms for this Customer.

autocollect

Boolean

This defines whether the billing system will attempt to collect from the customer's payment method on file.

The global auto collect setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer. This setting can only be explicitly set to True if the customer has a Payment Method, such as a credit card of ACH account, on file.

If set to true then when charges are applied to the Customer the billing system will attempt to collect them in full form the default payment method on file. If set to false the billing system will not collect automatically. If set to null then the billing system will use the global auto collect setting.

rechargeType

String

This value should be set to "BringBalanceBackTo" in any case where you want to use the threshold billing feature.

rechargeThresholdAmount

Decimal

This is the value which triggers a threshold collection. If the customer balance drops below this number when an invoice is posted the system will automatically collect enough funds to bring the balance back to the rechargeTargetAmount.

rechargeTargetAmount

Decimal

This is the customer balance which will be collected when the customer balance dips below the threshold. For example, the threshold amount could be $20 and this value set to $50. In this case, the system will collect funds if to bring the balance back to $50 if the customer drops below $20.

statusOnThreshold

Boolean

This setting determines if the customer should enter poor standing if their balance dips below the set threshold and the payment to restore the balance fails.

autoPostDraftInvoice

Boolean

Controls whether ready draft invoices should be posted automatically or remain in draft to be posted manually. Null means to follow account defaults

customerGracePeriod

Integer

The number of days a customer can be in poor standing before suspension occurs.

gracePeriodExtension

Integer

The default number of days a grace period can be manually extended

standingPoNumber

String

This is the PO number which will be added to this customer's invoices. [Max Length: 255 characters]

acquisitionCost

Integer

This is the cost in dollars spent to acquire this customer. This factors into the customer profitability metric.

showZeroDollarCharges

Boolean

This defines if this customer will show or not show $0 charges on their invoices. This can be either true, which means Fusebill will show charges, or false, which means Fusebill will hide these charges, or null which means the customer is using the account level default option.

taxExempt

Boolean

This defines if this customer should be charged taxes.

taxExemptCode

String

This is the tax exemption code for this customer. If taxExempt is set to True this field must be populated. [Max Length: 255 characters]

useCustomerBillingAddress

Boolean

If true, billing address is used as shipping address.

avalaraUsageType

String

This is a string sent to Alavara for determining the application of various sales taxes. [Max Length: 4 characters]

vatIdentificationNumber

Integer

The number associated with the client's EU Vat ID.

customerServiceStartOption

Enum: { ChargeForAllMissedPeriods, ChargeForLastMIssedPeriods, NoChargesForMissedPeriods, ChargeForCurrentFullPeriod}

This setting allows you to specify how you would like the system to behave if a customer is automatically moved from suspend status back to active status as a result of successfully auto-collecting outstanding balances. Null means to follow the account defaults.

rollUpTaxes

Boolean

This option determines if the taxes on the customer's invoices will appear 'rolled up' as one line (eg: Taxes: $4.56) or if the will be broken into multiple lines (eg: State Tax: $3.45 and Federal Tax: $1.34).

rollUpDiscounts

Boolean

If true, all of the discounts for all products and plans on the invoices for this customer will be rolled up into a single line item at the bottom of the invoice. Null follows the default of the Fusebill account.

trackedItemDisplay

Object (defined below)

Controls the appearance of tracked items on invoices for the customer.

customerAutoCancel

Integer

The number of days after suspension before the customer is cancelled by the system.

DefaultCancelOption

Enum:{Full, None, Unearned}

Controls revenue recognition in the event of customer automatic cancellation. "Full" means to reverse all charges fully. "None" means earn all charges. "Unearned" means to reverse unearned amounts for all charges. Null means to follow the default of the Fusebill account.

postReadyChargesOnRenew

Boolean

Controls whether draft ready charges are posted on renewal. This includes new ready draft charges from renewals and any existing ready draft charges from subscriptions and purchases. Null means to follow the Fusebill account default.

trackedItemDisplayFormat Object

Property
Type
Description

trackedItemDisplayFormat

Enum:{Inline, SeperatePage}

Controls where the tracked items are displayed.

showTrackedItemName

Boolean

This controls if the tracked items names are displayed.

showTrackedItemReference

Boolean

This controls if the tracked items' reference are displayed.

showTrackedItemDescription

Boolean

This controls if the tracked items' description are displayed.

showTrackedItemCreatedDate

Boolean

This controls if tracked items' created dates are displayed.

Address Preference Object

Property
Type
Description

contactName

String

This is an optional field for storing the contact name of the recipient, if different from the name included in the address itself.

[Max Length: 100]

shippingInstructions

String

This free text field allows you to add shipping instructions such as "Bring to Loading Bay #7".

[Max Length: 1000]

useBillingAddressAsShippingAddress

Boolean

If true, billing address is used as the shipping address.

Monthly Billing Period Object

Property
Type
Description

type

Enum: {CustomerActivation,
FirstSubscriptionActivation, SpecifiedDate}

Default billing period types for this customer's monthly subscriptions.

rule

Enum: {SingleInvoice, MultipleInvoices, Prompt, OneInvoicePerDay}

The invoicing rule for monthly billing periods. Single Invoice compiles subscriptions of the given interval on one invoice. Multiple Invoices separates them as one invoice per subscription. One Invoice Per Day posts an invoice every day. Prompt requires an agent to approve it each time.

day

Integer (1-28)

The day of the month to begin invoicing.

Annual Billing Period Object

Property
Type
Description

type

Enum: {CustomerActivation,
FirstSubscriptionActivation, SpecifiedDate}

Default billing period types for this customer's yearly subscriptions.

rule

Enum: {SingleInvoice, MultipleInvoices, Prompt, OneInvoicePerDay}

The invoicing rule for yearly billing periods. Single Invoice compiles subscriptions of the given interval on one invoice. Multiple Invoices separates them as one invoice per subscription. One Invoice Per Day posts an invoice every day. Prompt requires an agent to approve it each time.

month

Integer (1-12)

Month to begin annual invoicing.

day

Integer (1-28)

Day of the month to begin invoicing.

Examples
curl -X POST "https://secure.fusebill.com/v1/customers" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{title:'Mr',firstName:'John',lastName:'Smith',companyName:'Acme Inc.'}"
//Json Payload
string jsonData = "{'firstName':'John', 'lastName':'Doe'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/customers");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dict to the Payload parameter
payload = {'firstName': 'John', 'lastName': 'Smith'}
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.post('https://stg-secure.fusebill.com/v1/customers',data=json.dumps(payload), headers=headers)
print(r.content)
{
  "username": "Bob78",
  "firstName": "Robert",
  "middleName": "James",
  "lastName": "Smith",
  "companyName": "Fusebill",
  "suffix": "jr",
  "primaryEmail": "[email protected]",
  "primaryPhone": 5551115555,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 1115551111,
  "title": "Dr",
  "reference": "CR12345",
  "currency": "USD",
  "customerReference": {
    "reference1": "custom value 1",
    "reference2": "custom value 2",
    "reference3": "custom value 3",
    "salesTrackingCodes": [
      {
        "type": "Sales Tracking Code 2",
        "code": "BravoCode"
      }
    ]
  },
  "customerAcquisition": {
    "adContent": "sample string 1",
    "campaign": "sample string 2",
    "keyword": "sample string 3",
    "landingPage": "sample string 4",
    "medium": "sample string 5",
    "source": "sample string 6"
  },
  "billingSetting": {
    "term": "Net0",
    "autoCollect": true,
    "rechargeType": "BringBalanceBackTo",
    "rechargeThresholdAmount": 100,
    "rechargeTargetAmount": 150,
    "statusOnThreshold": true,
    "autoPostDraftInvoice": true,
    "customerGracePeriod": 1,
    "gracePeriodExtension": 1,
    "showZeroDollarCharges": true,
    "taxExempt": false
  },
  "billing": {
    "companyName": "Fusebill",
    "line1": "38 Main St",
    "city": "Brisbane",
    "postalZip": 12345,
    "country": "USA",
    "state": "NM"
  },
  "Shipping": {
    "companyName": "Fusebill",
    "line1": "39 Main St",
    "city": "Brisbane",
    "postalZip": 12345,
    "country": "USA",
    "state": "NM"
  },
  "addressPreference": {
    "useBillingAddressAsShippingAddress": true
  },
  "monthlyBillingPeriodConfiguration": {
    "type": "CustomerActivation",
    "rule": "SingleInvoice",
    "day": 10
  }
}
Response
{
  "firstName": "Shields",
  "middleName": "Payne",
  "lastName": "Gillespie",
  "companyName": "Cuizine",
  "suffix": "Jr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 8784473067,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 8955793436,
  "title": "Dr",
  "reference": 100986,
  "status": "Draft",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Shields1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "customer.PrimaryEmail",
            "Value": "Please enter valid email addresses"
        }
    ]
}
Suggest Edits

Activate Customer

This function allows you to activate a customer currently in draft status.

There are various fields in the JSON payload which are required when activating a draft customer. These options are activateAllSubscriptions , activateAllDraftPurchases and temporarilyDisableAutoPost. All of these fields are required unless preview has been set to true, in which case only the customerID is required.

To include the full invoice object created from the activation , you can include the parameter view=sideeffects in the URL. This will cause the newly created invoice object to be included in the response.

 
posthttps://secure.fusebill.com/v1/customeractivation?preview=preview&showzerodollarcharges=showzerodollarcharges&view=view
 

Sample Requests

POST https://secure.fusebill.com/v1/customerActivation?Preview=true&showzerodollarcharges=true&view=sideeffects

//This request will preview the customer activation, and show any zero dollar charges on invoices. After this call the customer will still be in draft state. 

{
  "customerId": 8708457,
  "activateAllSubscriptions": true,
  "activateAllDraftPurchases": true,
  "temporarilyDisableAutoPost": false
}


POST https://secure.fusebill.com/v1/customerActivation

//This request will activate the customer

{
  "customerId": 8708457,
  "activateAllSubscriptions": true,
  "activateAllDraftPurchases": true,
  "temporarilyDisableAutoPost": false
}
POST https://secure.fusebill.com/v1/customerActivation?view=sideeffects

//This request will activate the customer, and the resulting response will include the invoice object within the payload. 

{
  "customerId": 8708457,
  "activateAllSubscriptions": true,
  "activateAllDraftPurchases": true,
  "temporarilyDisableAutoPost": false
}

URL Parameters

Property
Type
Description
Required

preview

String

If the Preview url parameter is set to True the customer is not activated, the call will simple simulate the activation and calculate the mock invoice.

Optional

showZeroDollarCharges

Boolean

If set to true, zero dollar charges will be included on invoices.

Optional

view

String

Acceptable value is "Sideeffects". Displays resulting invoices

Optional

Request Parameters

Property
Type
Description
Required

customerId

Integer

This is the Fusebill ID of the customer

Yes

activateAllSubscriptions

Boolean

If True, draft subscriptions will be activated along with the customer

Yes, unless preview is set to true.

activateAllDraftPurchases

Boolean

If True, draft purchases will be activated along with the customer

Yes, unless preview is set to true.

temporarilyDisableAutoPost

Boolean

This will specify whether or not the resulting invoice from this call will post the related invoice or not

Yes, unless preview is set to true.

Example
curl -X POST "https://secure.fusebill.com/v1/CustomerActivation?preview=true" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{"customerId": 8708457, "activateAllSubscriptions": true,                            	   "activateAllDraftPurchases": true, "temporarilyDisableAutoPost": false}"
//Query string
string previewQuery = "false";
//Json Payload
string jsonData = "{
  "customerId": 8708457,
  "activateAllSubscriptions": true,
  "activateAllDraftPurchases": true,
  "temporarilyDisableAutoPost": false
}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/CustomerActivation?preview="+previewQuery);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
import json
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"customerId": 8708457, "activateAllSubscriptions": true, "activateAllDraftPurchases": true, "temporarilyDisableAutoPost": false}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/CustomerActivation?preview=true',data=json.dumps(payload), headers=headers)
print(r.content)
{
  "customerId": 650512,
  "activateAllSubscriptions": true,
  "activateAllDraftPurchases": true,
  "temporarilyDisableAutoPost": true
}
Response
{
  "firstName": "Richardson",
  "middleName": "Reeves",
  "lastName": "Woods",
  "companyName": "Gadtron",
  "suffix": "Sr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 8874452248,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 8585333923,
  "title": "Mrs",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Richardson1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "This activity could not be processed since the service status is Active"
        }
    ]
}
Suggest Edits

Activate Customer's Specific Subscriptions and Purchases

This call is used to activate/finalize draft subscriptions/purchases on a customer who is already in status 'Active'. This can be used to activate/finalize all of their draft subscriptions/purchases, or a subset of their draft subscriptions/purchases

 
posthttps://secure.fusebill.com/v1/customers/purchase/customerID
 

Path Parameters

Property
Type
Description

customerID

Integer

The Fusebill generated ID that uniquely identifies the customer

Request Parameters

Property
Type
Description
Required

preview

Boolean

If true, results in no system change. Instead, a preview of the resulting invoice and charges are returned as a response. False by default

Optional

temporarilyDisableAutoPost

Boolean

If true, then the invoice that might otherwise automatically be posted as a result of this POST will instead be created in 'draft' form. False by default

Optional

invoiceCollectOptions

Object. Defined below

This can be used to provide special invoice collection instructions

Optional

specificSubscriptionIds

List of Integers

A list of the specific draft subscription Fusebill IDs belonging to this customer that are to be activated

Optional

specificPurchaseIds

List of Integers

A list of the specific draft purchase Fusebill IDs belonging to this customer that are to be finalized

Optional

Providing no JSON body

This call can be made with no JSON body. Doing this has the effect of activating all the draft subscriptions on the customer, and finalizing all the draft purchases on the customer. Providing the specificPurchaseIds or specificSubscriptionIds tells Fusebill to activate/finalize a subset of the customer's draft subscriptions/purchases

Invoice Collect Options

Property
Type
Description

paymentMethod

Enum: { UseDefaultPaymentMethod, UseExistingPaymentMethod, UseExistingPaymentMethodAndMakeDefault, UseProvidedPaymentMethodOnce, UseProvidedPaymentMethodAndMakeDefault, UseProvidedPaymentMethodAndSave, CreateAndApplyCredit}

Controls which payment method to use

paymentMethodId

Integer

ID of the payment method.

useAnyAvailableFundsFirst

Boolean

Controls whether available funds on the customer entity should be used first.

creditCard

Object

See credit card creation parameters as outlined in Create Credit Card Payment Method

achCard

Object

See ACH card creation parameters as outlined in Create ACH Payment Method

rollbackOnFailedPayment

Boolean

If payment fails, Fusebill can undo this action and prevent the invoice from posting.

Examples
curl –X POST https://secure.fusebill.com/v1/customers/purchase/12345 \ 
  -H "Content-Type: application/json" \ 
  -H "Authorization: Basic {APIKey}" \ 
  -d "{specificSubscriptionIds:[1254352,5463542,4523453],specificPurchaseIds: [5452451,6798652,8768453]}"
//Json data 
string jsonData = "{'specificSubscriptionIds':[1254352,5463542,4523453],'specificPurchaseIds': [5452451,6798652,8768453]}"; 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/purchase/12345"); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "POST"; 
//Add the json data to request 
using (var streamWriter = new StreamWriter(request.GetRequestStream())) 
{ 
  streamWriter.Write(jsonData); 
  streamWriter.Flush(); 
  streamWriter.Close(); 
} 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
{ 
  result = streamReader.ReadToEnd(); 
}  
#Import library JSON 
import json 
#Import library Requests 
import requests 
#Pass in a dictionary to the Headers parameter 
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'} 
#Pass in a dict to the Payload parameter 
payload = {'specificSubscriptionIds':[1254352,5463542,4523453],'specificPurchaseIds':[5452451,6798652,8768453} 
#Pass in your URI, Payload and Headers 
r = requests.post('https://secure.fusebill.com/v1/customers/purchase/12345', data=json.dumps(payload), headers=headers) 
print(r.content)
{
    "specificSubscriptionIds": [
        1254352,
        5463542,
        4523453
    ],
    "specificPurchaseIds": [
        5452451,
        6798652,
        8768453
    ]
}
{
    "preview": false,
    "temporarilyDisableAutoPost": false,
    "invoiceCollectOptions": {
        "paymentMethod": "UseProvidedPaymentMethodAndSave",
        "useAnyAvailableFundsFirst": false,
        "creditCard": {
            "cardNumber": 1234123412341234,
            "expirationMonth": 2,
            "expirationYear": 23,
            "cvv": 123,
            "firstName": "Karen",
            "lastName": "Wood",
            "address1": "10 Dodge St",
            "address2": "",
            "city": "Columbia",
            "stateId": 1,
            "countryId": 124,
            "source": "Manual",
            "postalZip": "V9V 9V9",
            "customerId": 12345678
        },
        "achCard": null,
        "rollbackOnFailedPayment": true
    },
    "specificSubscriptionIds": [
        1254352,
        5463542,
        4523453
    ],
    "specificPurchaseIds": [
        5452451,
        6798652,
        8768453
    ]
}
Response
{
    "invoicePreview": {
        "draftCharges": [
            {
                "transactionId": 0,
                "chargeTypeId": null,
                "transactionType": "Charge",
                "quantity": 1.0,
                "unitPrice": 250.00,
                "amount": 250.00,
                "taxableAmount": 250.00,
                "subscriptionPeriodId": 0,
                "draftInvoiceId": 0,
                "name": "Premium Access",
                "description": null,
                "effectiveTimestamp": "2020-01-23T17:38:07.0001004Z",
                "proratedUnitPrice": null,
                "startServiceDate": "2020-01-23T00:00:00",
                "endServiceDate": "2020-02-22T00:00:00",
                "rangeQuantity": null,
                "draftDiscount": null,
                "draftDiscounts": [],
                "status": "Active",
                "productItems": null,
                "canProrateCharge": false,
                "postable": true,
                "subscriptionProductId": 25714915,
                "purchaseId": null,
                "productId": 25044592,
                "draftChargeTiers": [],
                "id": 0,
                "uri": null
            },
            {
                "transactionId": 0,
                "chargeTypeId": null,
                "transactionType": "Charge",
                "quantity": 0.0,
                "unitPrice": 10.00,
                "amount": 0.00,
                "taxableAmount": 0.00,
                "subscriptionPeriodId": 0,
                "draftInvoiceId": 0,
                "name": "GPS device",
                "description": null,
                "effectiveTimestamp": "2020-01-23T17:38:07.0001004Z",
                "proratedUnitPrice": null,
                "startServiceDate": "2020-01-23T00:00:00",
                "endServiceDate": "2020-01-23T00:00:00",
                "rangeQuantity": null,
                "draftDiscount": null,
                "draftDiscounts": [],
                "status": "Active",
                "productItems": null,
                "canProrateCharge": false,
                "postable": true,
                "subscriptionProductId": 25714913,
                "purchaseId": null,
                "productId": 25188589,
                "draftChargeTiers": [],
                "id": 0,
                "uri": null
            }
        ],
        "subtotal": 250.00,
        "total": 250.00,
        "draftTaxes": [],
        "totalTaxes": 0.00,
        "totalDiscount": 0.0,
        "poNumber": null,
        "effectiveTimestamp": "0001-01-01T00:00:00",
        "status": "Ready",
        "draftChargeGroups": [
            {
                "name": "bronze",
                "description": "the bronze plan",
                "reference": null,
                "subscriptionId": 12092276,
                "draftCharges": [
                    {
                        "transactionId": 0,
                        "chargeTypeId": null,
                        "transactionType": "Charge",
                        "quantity": 1.0,
                        "unitPrice": 250.00,
                        "amount": 250.00,
                        "taxableAmount": 250.00,
                        "subscriptionPeriodId": 0,
                        "draftInvoiceId": 0,
                        "name": "Premium Access",
                        "description": null,
                        "effectiveTimestamp": "2020-01-23T17:38:07.0001004Z",
                        "proratedUnitPrice": null,
                        "startServiceDate": "2020-01-23T00:00:00",
                        "endServiceDate": "2020-02-22T00:00:00",
                        "rangeQuantity": null,
                        "draftDiscount": null,
                        "draftDiscounts": [],
                        "status": "Active",
                        "productItems": null,
                        "canProrateCharge": false,
                        "postable": true,
                        "subscriptionProductId": 25714915,
                        "purchaseId": null,
                        "productId": 25044592,
                        "draftChargeTiers": [],
                        "id": 0,
                        "uri": null
                    },
                    {
                        "transactionId": 0,
                        "chargeTypeId": null,
                        "transactionType": "Charge",
                        "quantity": 0.0,
                        "unitPrice": 10.00,
                        "amount": 0.00,
                        "taxableAmount": 0.00,
                        "subscriptionPeriodId": 0,
                        "draftInvoiceId": 0,
                        "name": "GPS tracker",
                        "description": null,
                        "effectiveTimestamp": "2020-01-23T17:38:07.0001004Z",
                        "proratedUnitPrice": null,
                        "startServiceDate": "2020-01-23T00:00:00",
                        "endServiceDate": "2020-01-23T00:00:00",
                        "rangeQuantity": null,
                        "draftDiscount": null,
                        "draftDiscounts": [],
                        "status": "Active",
                        "productItems": null,
                        "canProrateCharge": false,
                        "postable": true,
                        "subscriptionProductId": 25714913,
                        "purchaseId": null,
                        "productId": 25188589,
                        "draftChargeTiers": [],
                        "id": 0,
                        "uri": null
                    }
                ]
            }
        ],
        "notes": null,
        "shippingInstructions": null,
        "openingArBalance": 250.0000,
        "closingArBalance": 500.0000,
        "creditFromAvailableFunds": 0.0
    }
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Unable to complete purchase, there was nothing to purchase for this customer."
        }
    ]
}
Suggest Edits

Hold Customer

This function is used to put a customer on the hold status. Any subscriptions on the customer will be placed into status suspended.

 
posthttps://secure.fusebill.com/v1/customerhold/customerId
 

Path Parameters

Property
Type
Description

customerId

integer

This is the id value which uniquely identifies a customer record in the Fusebill system. This value is unique to each customer.

Examples
curl -X POST "https://secure.fusebill.com/v1/CustomerHold/{id}" \
	-H "Content-Type: application/json" \
	-H "Content-Length: 0" \
	-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id Field Returned by Create/Update customer
int pathParameter = {id};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/CustomerHold/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.post('https://secure.fusebill.com/v1/customerHold/{id}', headers=headers)
print(r.content)
This POST call does not take a JSON payload
Response
{
  "firstName": "Maryanne",
  "middleName": "Cecelia",
  "lastName": "Flores",
  "companyName": "Grok",
  "suffix": "Sr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 9594952713,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 8154223872,
  "title": "Mrs",
  "reference": 100986,
  "status": "Hold",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Maryanne1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,    
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 128414930 not found."
        }
    ]
}
Suggest Edits

Un-Hold Customer

This function is used to remove the hold status from a customer. They will revert to active status.

 
posthttps://secure.fusebill.com/v1/customers/unhold
 

Request Parameters

Property
Type
Description
Required

customerId

Integer

This is the the Id value which uniquely identifies this
Customer record in the Fusebill system. This value is unique to each customer.

Yes

serviceStartOption

Enum: {ChargeForAllMissedPeriods, ChargeForLastMissedPeriods, NoChargesForMissedPeriods, ChargeForCurrentFullPeriod}

When the customer is taken off of the Hold status, you are given a number of options for collection of outstanding funds owing.

Yes

preview

Boolean

If set to True the customer is not taken off hold, the call will simply simulate the unhold action and calculate the mock invoice.

Optional

showZeroDollarCharges

Boolean

Controls whether zero dollar charges are shown on the invoice preview if preview is true

Optional

temporarilyDisableAutoPost

Boolean

This key allows you to temporarily disable invoice post and thus the collection of outstanding amounts owing.

Optional

Examples
curl -X POST "https://secure.fusebill.com/v1/customers/unHold" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{id},serviceStartOption:'ChargeForCurrentFullPeriod',showZeroDollarCharges:false,temporarilyDisableAutoPost:false,prorate:false,preview:true}"
//Json data, Fusebill Id which corresponds to the customerId Field
string jsonData = "{'id':{id},'serviceStartOption':'ChargeForCurrentFullPeriod','preview':false,'showZeroDollarCharges':false,'temporarilyDisableAutoPost':false,'prorate':false}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/unHold");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dict to the Payload parameter
payload = {'customerId':{id},"serviceStartOption":"ChargeForAllMissedPeriods","preview":'false',"showZeroDollarCharges":'false',"temporarilyDisableAutoPost":'false'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/customers/unHold', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "customerId": 180513,
  "serviceStartOption": "ChargeForLastMissedPeriods",
  "preview": false,
  "showZeroDollarCharges": false,
  "temporarilyDisableAutoPost": false
}
Response
{
  "firstName": "Cleo",
  "middleName": "Flowers",
  "lastName": "Santiago",
  "companyName": "Bedder",
  "suffix": "Sr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 8435292637,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 9704712723,
  "title": "Ms",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Cleo1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "customerHold.CustomerServiceStartOption",
            "Value": "Allowable Service Start Option are: null, ChargeForAllMissedPeriods, ChargeForLastMissedPeriods, NoChargesForMissedPeriods, ChargeForCurrentFullPeriod"
        }
    ]
}
Suggest Edits

Cancel Customer

This function allows you to cancel a customer currently in any non-cancelled status. Canceling a customer also cancels subscriptions associated with that customer. Cancelling applies the same cancellationOption to the Subscriptions as was specified in the Customer Cancellation action. For example, "Full" will refund the Customer the full value of each Subscription active on their account.

 
posthttps://secure.fusebill.com/v1/customercancellation
 

Request Parameters

Property
Type
Description
Required

customerId

integer

The customerId value uniquely identifies a Customer record in the Fusebill system. This value is unique to each customer.

Yes

cancellationOption

Enum: {None, Unearned, Full}

This field defines how the system behaves when cancelling the customer's subscriptions.

"None" indicates that no reversal will take place, and the system will fully earn the charges.

"Unearned" will reverse the unearned revenue amounts. This is a typically partial reversal based on monthly or daily earning rules set on the plan product level at the time the subscription was created.

"Full" will fully reverse all charges for the current period, regardless of how much is earned.

Yes

Examples
curl HTTPS://secure.fusebill.com/v1/CustomerCancellation \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerId:{Id}, cancellationOption:'None'}"
//Json Payload
string jsonData = "{'customerId':{Id}, 'cancellationOption':'None'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerCancellation");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dict to the Payload parameter
payload = {'customerId': {id}, 'cancellationOption': 'None'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/customerCancellation',data=json.dumps(payload), headers=headers)
print(r.content)
{
  "customerId": 1234,
  "cancellationOption": "None"
}
Response
Returns a 204 No Content Response upon success
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Allowable Cancel Options are: None, Unearned, Full"
        }
    ]
}
Suggest Edits

Uncancel Customer

This function is used to un-cancel a previously cancelled customer.

 
posthttps://secure.fusebill.com/v1/customers/uncancel/customerId
 

Path Parameters

Property
Type
Description

customerId

integer

This is the id value which uniquely identifies a Customer record in the Fusebill system. This value is unique to each customer.

Examples
curl -X POST "https://secure.fusebill.com/v1/customers/uncancel/{id}" \
	-H "Content-Type: application/json" \
	-H "Content-Length: 0" \
	-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id Field Returned by Create/Update customer
int pathParameter = {id}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/customers/uncancel/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Json
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.post('https://stg-secure.fusebill.com/v1/customers/uncancel/{id}', headers=headers)
print(r.content)
This POST call does not take a JSON payload
Response
{
  "firstName": "Tammy",
  "middleName": "Gilliam",
  "lastName": "Campbell",
  "companyName": "Nitracyr",
  "suffix": "Jr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 8545163066,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 9135892729,
  "title": "Ms",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Tammy1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Suggest Edits

Update Customer

This function is used to modify an existing Customer object.

Please Note: Most fields must be fully detailed in the JSON passed in as the body of the PUT – The system will nullify fields that are not included and detailed.

Minimum Request: Currency does not need to be included as it will default to your selected default currency. In all cases, include id and status even if you are not planning to change the status value as failing to do so will return an error from the system.

The easiest way to use this and many other PUT endpoints is to read the object, copy the JSON response, modify the desired fields, then use that modified JSON as the payload for the PUT call.

 
puthttps://secure.fusebill.com/v1/customers
 

Request Parameters

Property
Type
Description

firstName

String

The first name of the Customer.

[Max Length: 50 characters]

middleName

String

The middle name of the Customer.

[Max Length: 50 characters]

lastName

String

The last name of the Customer.

[Max Length: 50 characters]

companyName

String

The company name associated with this customer.

[Max Length: 50 characters]

suffix

String

The name suffix of the customer, for example Jr. or Sr.

[Max Length: 50 characters]

primaryEmail

String

The primary contact email for the Customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". Invoices and other email communications will be sent to this address(s).

[Max Length: 255 characters]

primaryPhone

String

The primary contact number for the Customer.

[Max Length: 50 characters]

secondaryEmail

String

The secondary contact email for the Customer. Allows multiple entries in the format "[email protected]; [email protected]; [email protected]". No communications are sent to this address

[Max Length: 255 characters]

secondaryPhone

String

The secondary contact number for the Customer.

[Max Length: 50 characters]

title

Enum:{Mr, Mrs, Ms, Miss, Dr}

The prefix-title of the customer.

reference

String

This is a free form reference field where you can store a reference string for this customer. Generally, this is used to store the reference/Id of this Customer in some external system to facilitate matching up the Fusebill Customer record to that system.

[Max Length: 255 characters]

status

Enum:{Draft, Active, Hold, Suspended, Cancelled}

The status of the Customer. This field can be used to change status under certain constraints. In general it is best to use methods like 'Hold Customer' and 'Activate Customer' to change customer status.

currency

3 character ISO currency code

The Currency configured for this Customer.

customerReference

Object (defined below)

This is used to store additional data related to this customer, including sales tracking codes.

customerAcquisition

Object (defined below)

This is used to store different details about how this customer was acquired. Generally, this is used to store marketing channel information.

parentId

Integer

The Parent ID relates to the Fusebill hierarchy feature. If hierarchy is enabled, this is the id of the parent customer.​

quickBooksLatchType

Enum:{CreateNew, LatchExisting, DoNothing}

Indicates how Fusebill is handling latching for this customer object and the possible corresponding customer in QuickBooks Online. This is for the QuickBooks Online plugin.

quickBooksId

Integer

The name ID of this customer in QuickBooks Online. For the QuickBooks Online plugin.

id

Integer

The Fusebill generated ID that uniquely identifies this customer.

Customer Reference Fields

Property
Type
Description

reference1

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference2

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

reference3

String

An optional open field to hold any alpha-numeric value on the customer.

[Max Length: 255 characters]

salesTrackingCodes

Object (definition below)

A collection of up to 5 SalesTrackingCode objects

SalesTracking Code Fields

Property
Type
Description

type

String

Identification of the sales tracking code type being set. The sales tracking code type can be configured under the sales tracking code section under your account settings

By default the accepted values are "Sales Tracking Code 1", "Sales Tracking Code 2" ... up to "Sales Tracking Code 5".

If you rename your sales tracking code, those names or the default names can be used.

[Max Length: 255 characters]

code

String

The specific sales tracking code value. The code must exist under the appropriate salestrackingcode type being referenced

[Max Length: 255 characters]

Customer Acquisition Fields

Property
Type
Description

adContent

String

Typically used to set the content description for the campaign ad. For all campaigns, or for a particular campaign, this appears as Ad Content under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

campaign

String

This variable is used to define the name of your campaign, which appears in the Analytics reports on the top-level campaign report.

[Max Length: 255 characters]

keyword

String

These are the words that visitors use to find your Website when using a search engine. Google Analytics provides a list of keywords that have been searched by users who find your Website. This information shows you what searchers are actually looking for when they find your Website. This also allows you to discover potential new keywords to target.

[Max Length: 255 characters]

landingPage

String

The first page a visitor views during a session; also known as the entrance page.

[Max Length: 255 characters]

medium

String

Typically used to define the type of the campaign, such as a banner ad, email campaign, or click ad. For all campaigns, or for a particular campaign, this appears as Keyword under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

source

String

The source variable is typically used to define where the campaign is originating from, such as a website name or a company. For all campaigns, or for a particular campaign, this appears as Source under the Segment pull-down in the Analytics Reports.

[Max Length: 255 characters]

Examples
curl -X PUT "https://secure.fusebill.com/v1/customers" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{id},title:'Mr',firstName:'John',lastName:'Smith',companyName:'Acme Inc.',Status:'Active'}"
//Json Payload
string jsonData = "{'firstName':'John','middleName':'B','lastName':'Smith','companyName':'Acme Inc','suffix':'Sr','primaryEmail':'[email protected]','primaryPhone':'809997777','secondaryEmail':'[email protected]','secondaryPhone':'1 (800) 445-6000','title':'Mr','reference':null,'status':'Cancelled','customerAccountStatus':'Good','currency':'USD','customerReference':{'reference1':null,'reference2':null,'reference3':null,'salesTrackingCodes':[],'id':169458},'customerAcquisition':{'adContent':null,'campaign':null,'keyword':null,'landingPage':null,'medium':null,'source':null,'id':169458},'monthlyRecurringRevenue':0,'netMonthlyRecurringRevenue':0,'salesforceId':null,'salesforceAccountType':null,'salesforceSynchStatus':'Enabled','netsuiteId':null,'netsuiteCustomerType':'','portalUserName':null,'parentId':null,'id':169458}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dict to the Payload parameter
payload = {'id': 183365, 'firstName': 'john', 'lastName': 'smith', 'Status': 'Active'}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/customers', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "firstName": "Katelyn",
  "middleName": "Kent",
  "lastName": "Floyd",
  "companyName": "Ronbert",
  "suffix": "Sr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 9964413586,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 9555473089,
  "title": "Miss",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Katelyn1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
Response
{
  "firstName": "Katelyn",
  "middleName": "Kent",
  "lastName": "Floyd",
  "companyName": "Ronbert",
  "suffix": "Sr.",
  "primaryEmail": "[email protected]",
  "primaryPhone": 9964413586,
  "secondaryEmail": "[email protected]",
  "secondaryPhone": 9555473089,
  "title": "Miss",
  "reference": 100986,
  "status": "Active",
  "customerAccountStatus": "Good",
  "currency": "USD",
  "customerReference": {
    "reference1": null,
    "reference2": "customValue",
    "reference3": null,
    "salesTrackingCodes": [],
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "customerAcquisition": {
    "adContent": null,
    "campaign": null,
    "keyword": null,
    "landingPage": null,
    "medium": null,
    "source": null,
    "id": 12000750,
    "uri": "https://secure.fusebill.com/v1/customers/12000750"
  },
  "monthlyRecurringRevenue": 250,
  "netMonthlyRecurringRevenue": 220,
  "salesforceId": 12345678,
  "salesforceAccountType": null,
  "salesforceSynchStatus": "Enabled",
  "netsuiteId": 12345678,
  "netsuiteSynchStatus": "Enabled",
  "netsuiteCustomerType": "Individual",
  "portalUserName": "Katelyn1974",
  "parentId": 12000749,
  "quickBooksLatchType": null,
  "quickBooksId": null,
  "quickBooksSyncToken": null,
  "hubSpotId": null,
  "hubSpotCompanyId":null,
  "modifiedTimestamp": "2019-11-07T15:51:11.1915461Z",
  "id": 12000750,
  "uri": "https://secure.fusebill.com/v1/customers/12000750"
}
//when changing status to 'Suspended'
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Cannot manually suspend customer, the system is in charge of suspending customers."
        }
    ]
}
Suggest Edits

Create Customer Note

This function is used to create a new Customer note.

 
posthttps://secure.fusebill.com/v1/customernotes
 

Request Parameters

Property
Type
Description
Required

customerid

Integer

This is the Fusebill generated customer ID

Yes

note

String

The is the string of text you wish to store on a customer. [Max Length: 2000 characters]

Yes

Examples
curl -X POST \
  https://secure.fusebill.com/v1/CustomerNotes \
  -H 'Authorization: Basic {APIKey}' \
  -H 'Content-Type: application/json' \
  -d '{
	"note":"Sample",
	"customerid":{CustomerId}
}'
//Json data, Fusebill Id which corresponds to the customerId Field
string jsonData = "{'customerId':{customerId},'note':'Test Note String'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerNotes");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}   
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {'customerId': {id},"note":"Sample customer note"}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/customerNotes', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "customerId": 5678131,
  "note": "This customer is hard of hearing, use email communications only"
}
Response
{
    "userWhoCreatedNote": "API - User not specified",
    "note": "hello world",
    "createdTimestamp": "2019-11-07T19:03:13.0001383Z",
    "id": 46600,
    "uri": null
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "entity.Note",
            "Value": "The note cannot exceed 2000 characters"
        }
    ]
}
Suggest Edits

Delete Customer Note

This request deletes a customer note using the Fusebill generated customer note ID

 
deletehttps://secure.fusebill.com/v1/customerNotes/noteID
 

URL Properties

Property
Type
Description

noteID

Integer

The Fusebill generated ID uniquely identifying the customer note

Examples
curl –X DELETE https://secure.fusebill.com/v1/customerNotes/Delete/{noteID} \ 
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}" 
//Setup Item ID 
Int noteID= {noteID} 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerNotes/Delete/" + noteID); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "DELETE"; 
//Add the json data to request 
using (var streamWriter = new StreamWriter(request.GetRequestStream())) 
{ 
  streamWriter.Write(jsonData); 
  streamWriter.Flush(); 
  streamWriter.Close(); 
} 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
{ 
  result = streamReader.ReadToEnd(); 
}  
#Import library JSON 
import json 
#Import library Requests 
import requests 
#Pass in a dictionary to the Headers parameter 
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'} 
#Pass in your URI, and Headers 
r = requests.delete('https://secure.fusebill.com/v1/customerNotes/Delete/{noteID}',  headers=headers) 
print(r.content) 
Response
Returns a 204 No Content Response upon success
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "CustomerNote with id 1 not found."
        }
    ]
}
Suggest Edits

Customer Email Object

The customer email object defines the email messages and preferences a customer should receive. Messages include "Credit Card Expiry Notices", "Invoice Overdue Notices" and others.

 

Currently, there are preference entities for the following emailTypes

  • InvoicePost
  • PaymentReceived
  • InvoiceOverdue
  • PasswordReset
  • PaymentFailed
  • CustomerActivation
  • SubscriptionActivation
  • SubscriptionCancellation
  • CustomerCredentialCreate
  • CustomerCredentialPasswordReset
  • CustomerSuspend
  • PaymentMethodUpdate
  • CreditCardExpiry
  • StatementNotification
  • UpcomingBillingNotification
  • Refund
  • PendingExpiryRenewalNotice

Additional preference entities may be added in the future so when editing the email preferences via the API it is suggested to always perform a GET to retrieve the full email preferences list and to then modify the data in that list and PUT that list to perform the edit action. This ensures the PUT action includes all the required preference entities.

Customer Email Preferences Fields

Field
Type
Description

customerId

Integer

This is the Fusebill ID of the customer to whom these preferences apply.

[Read Only]

preferences

List of Objects (definition below)

This is the list of Preference entities.

Preferences Object Fields

Field
Type
Description

enabled

String

Specify whether or not the specified email notification is enabled. Values should be one of: "true", "false" or NULL (account default)

accountDefault

Boolean

The default preference across the account. To be used if enabled is NULL.

[Read Only]

emailType

Enum:{InvoicePost, PaymentReceived, InvoiceOverdue, PasswordReset, PaymentFailed, CustomerActivation, SubscriptionActivation, SubscriptionCancellation, CustomerCredentialCreate, CustomerCredentialPasswordReset, CustomerSuspend, PaymentMethodUpdate, CreditCardExpiry, StatementNotification, UpcomingBillingNotification, Refund, PendingExpiryRenewalNotice}

Used to specify which email notification. Valid values are any of the following:

[Read Only]

emailCategory

String

Describes the general category of the email. Mostly for internal use.

[Read Only]

Suggest Edits

Read Customer Email Preferences

This function allows you to get the email preferences for a specific customer.

 
gethttps://secure.fusebill.com/v1/customers/customerId/CustomerEmailPreferences
 

Path Parameters

Property
Type
Description

customerId

Integer

This is the the ID value which uniquely identifies this Customer record in the Fusebill system. This value is unique to each customer.

Examples
curl -X GET "https://secure.fusebill.com/v1/customers/{customerId}/CustomerEmailPreferences" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id Field Returned by Create/Update customer
int pathParameter = {customerId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/"+pathParameter+"/CustomerEmailPreferences");
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/customers/{id}/CustomerEmailPreferences', headers=headers)
print(r.content)
Response
{
    "customerId": 648454,
    "preferences": [
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "CreditCardExpiry",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "CustomerActivation",
            "emailCategory": "Customers"
        },
        {
            "enabled": true,
            "accountDefault": false,
            "emailType": "CustomerCredentialCreate",
            "emailCategory": "Customers"
        },
        {
            "enabled": null,
            "accountDefault": true,
            "emailType": "CustomerCredentialPasswordReset",
            "emailCategory": "Customers"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "CustomerSuspend",
            "emailCategory": "Customers"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "DraftInvoice",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "InvoiceOverdue",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "InvoicePost",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "PaymentFailed",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": true,
            "accountDefault": false,
            "emailType": "PaymentMethodUpdate",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": true,
            "accountDefault": false,
            "emailType": "PaymentReceived",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "PendingExpiryRenewalNotice",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "Refund",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "StatementNotification",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "SubscriptionActivation",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "SubscriptionCancellation",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": null,
            "accountDefault": false,
            "emailType": "UpcomingBillingNotification",
            "emailCategory": "InvoicesAndStatements"
        }
    ]
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Suggest Edits

Update Customer Email Preferences

This call allows you to edit the customer email preferences for a specific customer. You must include all the preference entities in the call to perform the edit action, even if you are not modifying some of those preference entities. They would be set to null (account default) otherwise.

 
puthttps://secure.fusebill.com/v1/CustomerEmailPreferences
 

Request Parameters

Field
Type
Description

customerId

Integer

This is the Fusebill ID of the customer to whom these preferences apply.

preferences

List of Objects (defined below)

This is the list of Preference entities.

Preferences Object Fields

Field
Type
Description

enabled

String

Specify whether or not the specified email notification is enabled. Values should be one of: "true", "false" or NULL (account default)

Note: To override the account default setting you must specify a value of either "true" or "false"

emailType

Enum:{InvoicePost, PaymentReceived, InvoiceOverdue, PasswordReset, PaymentFailed, CustomerActivation, SubscriptionActivation, SubscriptionCancellation, CustomerCredentialCreate, CustomerCredentialPasswordReset, CustomerSuspend, PaymentMethodUpdate, CreditCardExpiry, StatementNotification, UpcomingBillingNotification, Refund, PendingExpiryRenewalNotice}

Used to specify which email notification the changes apply to.

Examples
curl -X PUT "https://secure.fusebill.com/v1/CustomerEmailPreferences" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{'customerId':{customerId},'preferences':[{'enabled':true,'accountDefault':false,'emailType':'CreditCardExpiry','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'CustomerActivation','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'CustomerCredentialCreate','emailCategory':'Customers'},{'enabled':false,'accountDefault':true,'emailType':'CustomerCredentialPasswordReset','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'CustomerSuspend','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'InvoiceOverdue','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':false,'emailType':'InvoicePost','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':true,'emailType':'PaymentFailed','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PaymentMethodUpdate','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PaymentReceived','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PendingExpiryRenewalNotice','emailCategory':'Subscriptions'},{'enabled':true,'accountDefault':false,'emailType':'Refund','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'StatementNotification','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':false,'emailType':'SubscriptionActivation','emailCategory':'Subscriptions'},{'enabled':false,'accountDefault':false,'emailType':'SubscriptionCancellation','emailCategory':'Subscriptions'},{'enabled':false,'accountDefault':false,'emailType':'UpcomingBillingNotification','emailCategory':'InvoicesAndStatements'}]}"
//Json Payload, Replace this customer Id with the FusebillId of the customer you would like to update
string jsonData = "{'customerId':{customerId},'preferences':[{'enabled':false,'accountDefault':false,'emailType':'CreditCardExpiry','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'CustomerActivation','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'CustomerCredentialCreate','emailCategory':'Customers'},{'enabled':false,'accountDefault':true,'emailType':'CustomerCredentialPasswordReset','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'CustomerSuspend','emailCategory':'Customers'},{'enabled':false,'accountDefault':false,'emailType':'InvoiceOverdue','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':false,'emailType':'InvoicePost','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':true,'emailType':'PaymentFailed','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PaymentMethodUpdate','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PaymentReceived','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'PendingExpiryRenewalNotice','emailCategory':'Subscriptions'},{'enabled':true,'accountDefault':false,'emailType':'Refund','emailCategory':'PaymentsAndRefunds'},{'enabled':false,'accountDefault':false,'emailType':'StatementNotification','emailCategory':'InvoicesAndStatements'},{'enabled':false,'accountDefault':false,'emailType':'SubscriptionActivation','emailCategory':'Subscriptions'},{'enabled':false,'accountDefault':false,'emailType':'SubscriptionCancellation','emailCategory':'Subscriptions'},{'enabled':false,'accountDefault':false,'emailType':'UpcomingBillingNotification','emailCategory':'InvoicesAndStatements'}]}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/CustomerEmailPreferences");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"customerId":{id},"preferences":

[{"enabled":None,"accountDefault":"false","emailType":"CreditCardExpiry","emailCategory":"PaymentsAndRefunds"},

{"enabled":None,"accountDefault":"false","emailType":"CustomerActivation","emailCategory":"Customers"},

{"enabled":None,"accountDefault":"false","emailType":"CustomerCredentialCreate","emailCategory":"Customers"},

{"enabled":None,"accountDefault":"true","emailType":"CustomerCredentialPasswordReset","emailCategory":"Customers"},

{"enabled":None,"accountDefault":"false","emailType":"CustomerSuspend","emailCategory":"Customers"},

{"enabled":None,"accountDefault":"false","emailType":"DraftInvoice","emailCategory":"InvoicesAndStatements"},

{"enabled":None,"accountDefault":"false","emailType":"InvoiceOverdue","emailCategory":"InvoicesAndStatements"},

{"enabled":None,"accountDefault":"false","emailType":"InvoicePost","emailCategory":"InvoicesAndStatements"},

{"enabled":None,"accountDefault":"false","emailType":"PaymentFailed","emailCategory":"PaymentsAndRefunds"},

{"enabled":None,"accountDefault":"false","emailType":"PaymentMethodUpdate","emailCategory":"PaymentsAndRefunds"},

{"enabled":None,"accountDefault":"true","emailType":"PaymentReceived","emailCategory":"PaymentsAndRefunds"},

{"enabled":None,"accountDefault":"false","emailType":"PendingExpiryRenewalNotice","emailCategory":"Subscriptions"},

{"enabled":None,"accountDefault":"false","emailType":"Refund","emailCategory":"PaymentsAndRefunds"},

{"enabled":None,"accountDefault":"false","emailType":"StatementNotification","emailCategory":"InvoicesAndStatements"},

{"enabled":None,"accountDefault":"false","emailType":"SubscriptionActivation","emailCategory":"Subscriptions"},

{"enabled":None,"accountDefault":"false","emailType":"SubscriptionCancellation","emailCategory":"Subscriptions"},

{"enabled":None,"accountDefault":"false","emailType":"UpcomingBillingNotification","emailCategory":"InvoicesAndStatements"}]}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/CustomerEmailPreferences', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "customerId": 12661902,
  "preferences": [
    {
      "enabled": true,
      "emailType": "CreditCardExpiry",
      "emailCategory": "PaymentsAndRefunds"
    },
    {
      "enabled": null,
      "emailType": "CustomerActivation",
      "emailCategory": "Customers"
    },
    {
      "enabled": null,
      "emailType": "CustomerCredentialCreate",
      "emailCategory": "Customers"
    },
    {
      "enabled": null,
      "emailType": "CustomerCredentialPasswordReset",
      "emailCategory": "Customers"
    },
    {
      "enabled": null,
      "emailType": "CustomerSuspend",
      "emailCategory": "Customers"
    },
    {
      "enabled": null,
      "emailType": "DraftInvoice",
      "emailCategory": "InvoicesAndStatements"
    },
    {
      "enabled": null,
      "emailType": "InvoiceOverdue",
      "emailCategory": "InvoicesAndStatements"
    },
    {
      "enabled": null,
      "emailType": "InvoicePost",
      "emailCategory": "InvoicesAndStatements"
    },
    {
      "enabled": null,
      "emailType": "PaymentFailed",
      "emailCategory": "PaymentsAndRefunds"
    },
    {
      "enabled": null,
      "emailType": "PaymentMethodUpdate",
      "emailCategory": "PaymentsAndRefunds"
    },
    {
      "enabled": null,
      "emailType": "PaymentReceived",
      "emailCategory": "PaymentsAndRefunds"
    },
    {
      "enabled": null,
      "emailType": "PendingExpiryRenewalNotice",
      "emailCategory": "Subscriptions"
    },
    {
      "enabled": null,
      "emailType": "Refund",
      "emailCategory": "PaymentsAndRefunds"
    },
    {
      "enabled": null,
      "emailType": "StatementNotification",
      "emailCategory": "InvoicesAndStatements"
    },
    {
      "enabled": null,
      "emailType": "SubscriptionActivation",
      "emailCategory": "Subscriptions"
    },
    {
      "enabled": null,
      "emailType": "SubscriptionCancellation",
      "emailCategory": "Subscriptions"
    },
    {
      "enabled": null,
      "emailType": "UpcomingBillingNotification",
      "emailCategory": "InvoicesAndStatements"
    }
  ]
}
Response
{
    "customerId": 6737347,
    "preferences": [
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "CreditCardExpiry",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "CustomerActivation",
            "emailCategory": "Customers"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "CustomerCredentialCreate",
            "emailCategory": "Customers"
        },
        {
            "enabled": false,
            "accountDefault": true,
            "emailType": "CustomerCredentialPasswordReset",
            "emailCategory": "Customers"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "CustomerSuspend",
            "emailCategory": "Customers"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "InvoiceOverdue",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "InvoicePost",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": false,
            "accountDefault": true,
            "emailType": "PaymentFailed",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "PaymentMethodUpdate",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "PaymentReceived",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "PendingExpiryRenewalNotice",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": true,
            "accountDefault": false,
            "emailType": "Refund",
            "emailCategory": "PaymentsAndRefunds"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "StatementNotification",
            "emailCategory": "InvoicesAndStatements"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "SubscriptionActivation",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "SubscriptionCancellation",
            "emailCategory": "Subscriptions"
        },
        {
            "enabled": false,
            "accountDefault": false,
            "emailType": "UpcomingBillingNotification",
            "emailCategory": "InvoicesAndStatements"
        }
    ]
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Suggest Edits

Customer Billing Settings Object

The customer billing settings resource defines the billing settings for the customer. In specific, these preferences control the payment terms and grace period applied to the customer as well as whether invoices auto post to the account and whether payments are automatically collected from credit card or ACH accounts on file.

Additional preferences may be added in the future so when editing the customer billing settings via the API it is suggested to always perform a GET to retrieve the full customer billing settings list and to then modify the data in that response and PUT that response to perform the edit action. This ensures the PUT action includes all the required customer billing settings fields.

 

Customer Billing Settings Fields

Property
Type
Description

invoiceDay

Integer

This field is deprecated and no longer used.

[Read Only]

term

Enum:{Net0, Net5, Net7, Net10, Net15, Net21, Net30, Net45, Net60, Net75, Net90, MFI1}

This defines the Payment Terms for this Customer.

interval

Enum: {Monthly, Yearly}

This field is deprecated and no longer used.

[Read Only]

autoCollect

Boolean

This defines whether the billing system will attempt to collect from the customer's payment method on file.

The global auto collect setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer. This setting can only be explicitly set to True if the customer has a Payment Method, such as a credit card of ACH account, on file.

If set to true then when charges are applied to the Customer the billing system will attempt to collect them in full form the default payment method on file. If set to false the billing system will not collect automatically. If set to null then the billing system will use the global auto collect setting.

rechargeType

String

This value should be set to "BringBalanceBackTo" in any case where you want to use the threshold billing feature.

rechargeThresholdAmount

Decimal

This is the value which triggers a threshold collection. If the customer balance drops below this number when an invoice is posted the system will automatically collect enough funds to bring the balance back to the rechargeTargetAmount.

rechargeTargetAmount

Decimal

This is the customer balance which will be collected when the customer balance dips below the threshold. For example, the threshold amount could be $20 and this value set to $50. In this case, the system will collect funds if to bring the balance back to $50 if the customer drops below $20.

statusOnThreshold

Boolean

This setting determines if the customer should enter poor standing if their balance dips below the set threshold and the payment to restore the balance fails.

autoPostDraftInvoice

Boolean

Controls whether ready draft invoices should be posted automatically or remain in draft to be posted manually. Null means to follow account defaults

hasPaymentMethod

Boolean

Indicates whether the customer has a payment method [Read Only]

customerGracePeriod

Integer

The number of days a customer can be in poor standing before suspension occurs.

gracePeriodExtension

Integer

The default number of days a grace period can be manually extended

customerAutoCancel

Integer

The number of days after suspension before the customer is cancelled by the system.

defaultCancelOption

Enum:{Full, None, Unearned}

Controls revenue recognition in the event of customer automatic cancellation. "Full" means to reverse all charges fully. "None" means earn all charges. "Unearned" means to reverse unearned amounts for all charges. NULL means to follow the default of the Fusebill account.

standingPoNumber

String

This is the PO number which will be added to this customer's invoices. [Max Length: 255 characters]

billingPeriodConfigurations

Object (defined below)

This list is populated it the billing settings at the customer level have been overridden.

acquisitionCost

Decimal

This is the cost in dollars spent to acquire this customer. This factors into the customer profitability metric.

showZeroDollarCharges

Boolean

This defines if this customer will show or not show $0 charges on their invoices. This can be either true, which means Fusebill will show charges, or false, which means Fusebill will hide these charges, or null which means the customer is using the account level default option.

taxExempt

Boolean

This defines if this customer should be charged taxes.

useCustomerBillingAddress

Boolean

Controls whether the shipping address or billing address for taxation purposes. If null, the system will use the account level tax setting configuration, if set to true the system will use the customer's billing address for taxes, and if set to false the system will use the customer's shipping address for taxes.

taxExemptCode

String

This is the tax exemption code for this customer. If taxExempt is set to True this field must be populated. [Max Length: 255 characters]

avalaraUsageType

String

This is a string sent to Alavara for determining the application of various sales taxes. [Max Length: 4 characters]

vatIdentificationNumber

Integer

The number associated with the clients EU Vat ID.

customerServiceStartOption

Enum: { ChargeForAllMissedPeriods, ChargeForLastMIssedPeriods, NoChargesForMissedPeriods, ChargeForCurrentFullPeriod}

This setting allows you to specify how you would like the system to behave if a customer is automatically moved from suspend status back to active status as a result of successfully auto-collecting outstanding balances. Null means to follow the account defaults.

rollUpTaxes

Boolean

This option determines if the taxes on the customer's invoices will appear 'rolled up' as one line (eg: Taxes: $4.56) or if the will be broken into multiple lines (eg: State Tax: $3.45 and Federal Tax: $1.34). Null means to follow the account defaults

rollUpDiscounts

Boolean

If true, all of the discounts for all products and plans on the invoices for this customer will be rolled up into a single line item at the bottom of the invoice. Null follows the default of the Fusebill account.

rollUpPdfsByPlanProduct

Boolean

Controls how subscription charges are displayed on downloaded invoices. True means to display summarized subscription product charges. False means to display detailed charges.

rollUpPdfsDisplayName

Boolean

Controls whether plan names are displayed on summarized invoices

rollUpPdfsDisplayDescription

Boolean

Controls whether plan descriptions are displayed on summarized invoices

rollUpPdfsDisplayAllUnitPrices

Boolean

Controls whether all unit prices are displayed on summarized invoices

pdfInvoiceEmailAttachmentOption

Enum:{Details, Summary, Both}

Controls how subscription charges are displayed on emailed invoices. "Details" means to show fully detailed charges. "Summary" means to show summarized charges. "Both" means to show both.

trackedItemDisplay

Object (defined below)

Controls the appearance of tracked items on invoices for the customer.

customerBillingStatementSetting

Object (defined below)

Controls the billing statement settings for this customer.

defaultPaymentMethodId

Integer

The Fusebill generated ID of the customer's default payment method.

postReadyChargesOnRenew

Boolean

Controls whether draft ready charges are posted on renewal. This includes new ready draft charges from renewals and any existing ready draft charges from subscriptions and purchases. Null means to follow the Fusebill account default.

id

String

This is the Customer ID of the customer to whom these preferences apply. [Read Only]

uri

String

The full string path to this resource. [Read Only]

Billing Period Configuration Object Fields

Property
Type
Description

type

Enum:{SpecifiedDate, CustomerActivation, FirstSubscriptionActivation}

Controls when subscriptions of the configured interval are recharged

rule

Enum:{SingleInvoice, MultipleInvoices, OneInvoicePerDay, Prompt}

Controls how to invoice. Single Invoice compiles subscriptions of the given interval on one invoice. Multiple Invoices separates them as one invoice per subscription. One Invoice Per Day posts an invoice every day. Prompt requires an agent to approve it each time.

interval

Enum:{Yearly, Monthly}

Indicates which type of billing period this configuration applies to.

day

Integer (1-31)

The day of the month to recharge. Use only if type is "SpecifiedDate"

month

Integer (1-12)

The month of the year to recharge. Use only if type is "SpecifiedDate" and interval is "Yearly"

Tracked Item Display Object Fields

Property
Type
Description

trackedItemDisplayFormat

Enum:{Inline, SeperatePage}

Controls where the tracked items are displayed.

showTrackedItemName

Boolean

This controls if the tracked items names are displayed.

showTrackedItemReference

Boolean

This controls if the tracked items' reference are displayed.

showTrackedItemDescription

Boolean

This controls if the tracked items' description are displayed.

showTrackedItemCreatedDate

Boolean

This controls if tracked items' created dates are displayed.

Customer Billing Statement Setting Object Fields

Property
Type
Description

option

Enum:{Detailed, BySubscription, Summarized}

Controls how the statement is generated.

type

Enum:{CustomerAnniversary, SpecifiedDate}

The basis for when statements are generated

interval

Enum:{Monthly, Yearly}

Controls frequency of statement generation.

day

Integer

The day of the month to generate the statement if type is "SpecifiedDate"

month

Integer

The month of the year to generate the statement if type is "SpecifiedDate" and interval is "Yearly".

trackedItemDisplay

Object (defined above)

Controls how tracked items are displayed on the statement.

statementActivityType

Enum: {OnlyParentActivity, OnlyChildActivity, ParentAndChildActivity}

Controls which activities to generate if customer hierarchy is being used.

Suggest Edits

Read Customer Billing Settings

This function allows you to get the Customer Billing Settings for a specific customer. In your request, the customerID is the primary unique identifier on the customer profile.

 
gethttps://secure.fusebill.com/v1/customerbillingsetting/customerId
 

Path Parameters

Property
Type
Description

customerId

Integer

The Fusebill generated ID that uniquely identifies the customer

Examples
curl -X GET "https://secure.fusebill.com/v1/customerbillingsetting/{customerId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id returned by Get Customer
int pathParameter = {customerId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerbillingsetting/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://secure.fusebill.com/v1/CustomerBillingSetting/{id}', headers=headers)
print(r.content)
Response
{
    "invoiceDay": -1,
    "term": "Net30",
    "interval": "Monthly",
    "autoCollect": null,
    "rechargeType": "",
    "rechargeThresholdAmount": null,
    "rechargeTargetAmount": null,
    "statusOnThreshold": null,
    "autoPostDraftInvoice": null,
    "hasPaymentMethod": true,
    "customerGracePeriod": null,
    "gracePeriodExtension": null,
    "standingPoNumber": null,
    "billingPeriodConfigurations": [
        {
            "type": "FirstSubscriptionActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Monthly",
            "day": null,
            "month": null
        },
        {
            "type": "FirstSubscriptionActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Yearly",
            "day": null,
            "month": null
        }
    ],
    "acquisitionCost": 0,
    "showZeroDollarCharges": null,
    "taxExempt": false,
    "useCustomerBillingAddress": null,
    "taxExemptCode": null,
    "avalaraUsageType": null,
    "vatIdentificationNumber": null,
    "customerServiceStartOption": "",
    "rollUpTaxes": null,
    "rollUpDiscounts": null,
    "trackedItemDisplay": null,
    "customerBillingStatementSetting": {
        "option": null,
        "type": null,
        "interval": null,
        "day": null,
        "month": null,
        "trackedItemDisplay": null
    },
    "defaultPaymentMethodId": 142291,
    "id": 342780,
    "uri": "https://secure.fusebill.com/v1/customerbillingsetting/342780"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Suggest Edits

Update Customer Billing Settings

This function allows you to override the default customer billing settings for a specific customer.

Recommended Request: We recommend that the invoiceDay field either be omitted or the value set to null for the PUT method.

 
puthttps://secure.fusebill.com/v1/customerbillingsetting
 

Request Parameters

Property
Type
Description

id

Integer

This is the Customer ID of the customer to whom these preferences apply.

invoiceDay

Integer

Deprecated.

term

Enum:{Net0, Net5, Net7, Net10, Net15, Net21, Net30, Net45, Net60, Net75, Net90, MFI1}

This defines the Payment Terms for this Customer.

interval

Enum: {Monthly, Yearly}

Deprecated.

autoCollect

Boolean

This defines whether the billing system will attempt to collect from the customer's payment method on file.

The global auto collect setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer. This setting can only be explicitly set to True if the customer has a Payment Method, such as a credit card of ACH account, on file.

If set to true then when charges are applied to the Customer the billing system will attempt to collect them in full form the default payment method on file. If set to false the billing system will not collect automatically. If set to null then the billing system will use the global auto collect setting.

rechargeType

String

This value should be set to "BringBalanceBackTo" in any case where you want to use the threshold billing feature.

rechargeThresholdAmount

Integer

This is the value which triggers a threshold collection. If the customer balance drops below this number when an invoice is posted the system will automatically collect enough funds to bring the balance back to the rechargeTargetAmount.

rechargeTargetAmount

Currency

This is the customer balance which will be collected when the customer balance dips below the threshold. For example, the threshold amount could be $20 and this value set to $50. In this case, the system will collect funds if to bring the balance back to $50 if the customer drops below $20.

statusOnThreshold

Boolean

This setting determines if the customer should enter poor standing if their balance dips below the set threshold and the payment to restore the balance fails.

autoPostDraftInvoice

Boolean

This defines whether the billing system will attempt to automatically post draft Invoices against the Customer's account.

The global autoPostDraftInvoice setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer.

If set to true then when an Invoice is generated in Draft status the Invoice will be automatically converted to a Posted invoice and the charges from the Invoice will be applied to the Customer. If set to false the billing system will not post the Invoices automatically. If set to NULL then the billing system will use the global autoPostDraftInvoice setting.

customerGracePeriod

Integer

This filed defines the number of days that the Customer is allowed to be in a PoorStanding status before the system will automatically place the Customer account in a Suspended state. Customer's enter PoorStanding when one or more Invoices go unpaid and enter an Overdue status.

gracePeriodExtension

Integer

This field is an add-on number of days which extends the Grace Period for this Customer. It is added to the normal Grace Period.

customerAutoCancel

Integer

The number of days after suspension before the customer is cancelled by the system.

defaultCancelOption

Enum:{Full, None, Unearned}

Controls revenue recognition in the event of customer automatic cancellation. "Full" means to reverse all charges fully. "None" means earn all charges. "Unearned" means to reverse unearned amounts for all charges. NULL means to follow the default of the Fusebill account.

standingPoNumber

String

This is the PO number which will be added to this customer's invoices. [Max Length: 255 characters]

billingPeriodConfigurations

List of objects (defined below)

This list is populated if the billing settings at the customer level have been overridden.

acquisitionCost

Decimal

This is the cost in dollars spent to acquire this customer. This factors into the Customer Profitability metric.

showZeroDollarCharges

Boolean

This defines if this customer will show or not show $0 charges on their invoices. This can be either true, which means Fusebill will show charges, or false, which means Fusebill will hide these charges, or null which means the customer is using the account level default option.

taxExempt

Boolean

This defines if this customer should be charged taxes.

taxExemptCode

String

This is the tax exemption code for this customer. If taxExempt is set to True this field must be populated.

useCustomerBillingAddress

Boolean

Controls whether the shipping address or billing address for taxation purposes. If null, the system will use the account level tax setting configuration, if set to true the system will use the customer's billing address for taxes, and if set to false the system will use the customer's shipping address for taxes.

avalaraUsageType

String

This is a string sent to Alavara for determining the application of various sales taxes.

vatIdentificationNumber

Integer

The number associated with the clients EU Vat ID

customerServiceStartOption

String

This setting allows you to specify how you would like the system to behave if a customer is automatically moved from Suspend Status back to Active status as a result of successfully auto-collecting outstanding balances.

rollUpTaxes

Boolean

This option determines if the taxes on the customer's invoices will appear 'rolled up' as one line (eg: Taxes: $4.56) or if the will be broken into multiple lines (eg: State Tax: $3.45 and Federal Tax: $1.34).

rollUpDiscounts

Boolean

If true, all of the discounts for all products and plans on the invoices for this customer will be rolled up into a single line item at the bottom of the invoice. Null follows the default of the Fusebill account.

rollUpPdfsByPlanProduct

Boolean

Controls how subscription charges are displayed on downloaded invoices. True means to display summarized subscription product charges. False means to display detailed charges.

rollUpPdfsDisplayName

Boolean

Controls whether plan names are displayed on summarized invoices

rollUpPdfsDisplayDescription

Boolean

Controls whether plan descriptions are displayed on summarized invoices

rollUpPdfsDisplayAllUnitPrices

Boolean

Controls whether all unit prices are displayed on summarized invoices

pdfInvoiceEmailAttachmentOption

Enum:{Details, Summary, Both}

Controls how subscription charges are displayed on emailed invoices. "Details" means to show fully detailed charges. "Summary" means to show summarized charges. "Both" means to show both.

trackedItemDisplay

Object (defined below)

Controls the appearance of tracked items on invoices for the customer.

customerBillingStatementSetting

Object (defined below)

Controls the billing statement settings for this customer.

postReadyChargesOnRenew

Boolean

Controls whether draft ready charges are posted on renewal. This includes new ready draft charges from renewals and any existing ready draft charges from subscriptions and purchases. Null means to follow the Fusebill account default.

Billing Period Configuration Object Fields

Property
Type
Description

type

Enum:{SpecifiedDate, CustomerActivation, FirstSubscriptionActivation}

Controls when subscriptions of the configured interval are recharged

rule

Enum:{SingleInvoice, MultipleInvoices, OneInvoicePerDay, Prompt}

Controls how to invoice. Single Invoice compiles subscriptions of the given interval on one invoice. Multiple Invoices separates them as one invoice per subscription. One Invoice Per Day posts an invoice every day. Prompt requires an agent to approve it each time.

interval

Enum:{Yearly, Monthly}

Indicates which type of billing period this configuration applies to.

day

Integer (1-31)

The day of the month to recharge. Use only if type is "SpecifiedDate"

month

Integer (1-12)

The month of the year to recharge. Use only if type is "SpecifiedDate" and interval is "Yearly"

Tracked Item Display Object Fields

Property
Type
Description

trackedItemDisplayFormat

Enum:{Inline, SeperatePage}

Controls where the tracked items are displayed.

showTrackedItemName

Boolean

This controls if the tracked items names are displayed.

showTrackedItemReference

Boolean

This controls if the tracked items' reference are displayed.

showTrackedItemDescription

Boolean

This controls if the tracked items' description are displayed.

showTrackedItemCreatedDate

Boolean

This controls if tracked items' created dates are displayed.

Customer Billing Statement Setting Object Fields

Property
Type
Description

option

Enum:{Detailed, BySubscription, Summarized}

Controls how the statement is generated.

type

Enum:{CustomerAnniversary, SpecifiedDate}

The basis for when statements are generated

interval

Enum:{Monthly, Yearly}

Controls frequency of statement generation.

day

Integer

The day of the month to generate the statement if type is "SpecifiedDate"

month

Integer

The month of the year to generate the statement if type is "SpecifiedDate" and interval is "Yearly".

trackedItemDisplay

Object (defined above)

Controls how tracked items are displayed on the statement.

statementActivityType

Enum: {OnlyParentActivity, OnlyChildActivity, ParentAndChildActivity}

Controls which activities to generate if customer hierarchy is being used.

Examples
curl -X PUT "https://secure.fusebill.com/v1/customerbillingsetting" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{customerId},invoiceDay:null,term:'Net0',interval:'Monthly',autoCollect:null,rechargeType:'',rechargeThresholdAmount:null,rechargeTargetAmount:null,statusOnThreshold:null,autoPostDraftInvoice:null,hasPaymentMethod:false,customerGracePeriod:null,gracePeriodExtension:null,standingPoNumber:null,billingPeriodConfigurations:[],acquisitionCost:0,showZeroDollarCharges:null,taxExempt:false,useCustomerBillingAddress:true,taxExemptCode:null,avalaraUsageType:null,vatIdentificationNumber:null,customerServiceStartOption:'',rollUpTaxes:null,rollUpDiscounts:null,trackedItemDisplay:null,customerBillingStatementSetting:{option:null,type:null,interval:null,day:null,month:null,trackedItemDisplay:null}}"
//Json data
string jsonData ="{id:{{customerId},invoiceDay:null,term:'Net0',interval:'Monthly',autoCollect:null,rechargeType:'',rechargeThresholdAmount:null,rechargeTargetAmount:null,statusOnThreshold:null,autoPostDraftInvoice:null,hasPaymentMethod:false,customerGracePeriod:null,gracePeriodExtension:null,standingPoNumber:null,billingPeriodConfigurations:[],acquisitionCost:0,showZeroDollarCharges:null,taxExempt:false,useCustomerBillingAddress:true,taxExemptCode:null,avalaraUsageType:null,vatIdentificationNumber:null,customerServiceStartOption:'',rollUpTaxes:null,rollUpDiscounts:null,trackedItemDisplay:null,customerBillingStatementSetting:{option:null,type:null,interval:null,day:null,month:null,trackedItemDisplay:null}}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerbillingsetting");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"invoiceDay": None,"term": "Net10","interval": "Monthly","autoCollect": None,"rechargeType": "","rechargeThresholdAmount": 

None,"rechargeTargetAmount": None,"statusOnThreshold": None,"autoPostDraftInvoice": None,"hasPaymentMethod": "false","customerGracePeriod": 

None,"gracePeriodExtension": None,"standingPoNumber": None,"billingPeriodConfigurations": [],"acquisitionCost": 0,"showZeroDollarCharges": None,"taxExempt": 

"false","useCustomerBillingAddress": None,"taxExemptCode": None,"avalaraUsageType": None,"vatIdentificationNumber": None,"customerServiceStartOption": 

"","rollUpTaxes": None,"rollUpDiscounts": None,"trackedItemDisplay": None,"customerBillingStatementSetting": {"option": None,"type": None,"interval": 

None,"day": None,"month": None,"trackedItemDisplay": None},"defaultPaymentMethodId": None,"id": {id},"uri": None}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/customerBillingSetting/{id}', data=json.dumps(payload), headers=headers)
print(r.content)
{
    "term": "Net0",
    "interval": "Monthly",
    "autoCollect": true,
    "rechargeType": "",
    "rechargeThresholdAmount": 0.00,
    "rechargeTargetAmount": 0.00,
    "statusOnThreshold": false,
    "autoPostDraftInvoice": null,
    "hasPaymentMethod": true,
    "customerGracePeriod": null,
    "gracePeriodExtension": null,
    "customerAutoCancel": null,
    "defaultCancelOption": "",
    "standingPoNumber": null,
    "billingPeriodConfigurations": [
        {
            "type": "SpecifiedDate",
            "rule": "SingleInvoice",
            "interval": "Monthly",
            "day": 4,
            "month": null
        }
    ],
    "acquisitionCost": 0.00,
    "showZeroDollarCharges": null,
    "taxExempt": false,
    "useCustomerBillingAddress": null,
    "taxExemptCode": null,
    "avalaraUsageType": null,
    "vatIdentificationNumber": null,
    "customerServiceStartOption": "",
    "rollUpTaxes": null,
    "rollUpDiscounts": null,
    "rollUpPdfsByPlanProduct": false,
    "rollUpPdfsDisplayName": true,
    "rollUpPdfsDisplayDescription": true,
    "rollUpPdfsDisplayAllUnitPrices": true,
    "pdfInvoiceEmailAttachmentOption": "Details",
    "trackedItemDisplay": null,
    "customerBillingStatementSetting": {
        "option": "Disabled",
        "type": null,
        "interval": null,
        "day": null,
        "month": null,
        "trackedItemDisplay": null,
        "statementActivityType": null
    },
    "defaultPaymentMethodId": 215715,
    "postReadyChargesOnRenew": null,
    "id": 654144,
    "uri": "https://secure.fusebill.com/v1/customerbillingsetting/654144"
}
Response
{
    "invoiceDay": null,
    "term": "Net30",
    "interval": "Monthly",
    "autoCollect": null,
    "rechargeType": "",
    "rechargeThresholdAmount": null,
    "rechargeTargetAmount": null,
    "statusOnThreshold": null,
    "autoPostDraftInvoice": null,
    "hasPaymentMethod": true,
    "customerGracePeriod": null,
    "gracePeriodExtension": null,
    "standingPoNumber": null,
    "billingPeriodConfigurations": [
        {
            "type": "CustomerActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Monthly",
            "day": null,
            "month": null
        },
        {
            "type": "FirstSubscriptionActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Yearly",
            "day": null,
            "month": null
        }
    ],
    "acquisitionCost": 0,
    "showZeroDollarCharges": null,
    "taxExempt": false,
    "useCustomerBillingAddress": null,
    "taxExemptCode": null,
    "avalaraUsageType": null,
    "vatIdentificationNumber": null,
    "customerServiceStartOption": "",
    "rollUpTaxes": null,
    "rollUpDiscounts": null,
    "trackedItemDisplay": null,
    "customerBillingStatementSetting": {
        "option": null,
        "type": null,
        "interval": null,
        "day": null,
        "month": null,
        "trackedItemDisplay": null
    },
    "defaultPaymentMethodId": 142291,
    "id": 342780,
    "uri": "https://secure.fusebill.com/v1/customerbillingsetting/342780"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Cannot set Invoice Day on Customer when Customer is Active."
        }
    ]
}
Suggest Edits

Customer Address Preferences Object

The customer address preferences object acts as a link between a customer resource and their billing and (optionally) shipping addresses. The preferences resource returns both billing and shipping addresses if they exist along with other address related information like which address should be used for shipping or the optional fields for the contact name and shipping instructions.

 

Customer Address Preferences Fields

Property
Type
Description

contactName

String

This is an optional field for storing the contact name of the recipient, if different from the name included in the address itself.

[Max Length: 100]

shippingInstructions

String

This free text field allows you to add shipping instructions.

[Max Length: 1000]

useBillingAddressAsShippingAddress

Boolean

This determines if this resource will have both a shipping and billing address. If true, the shipping Address is hidden in the UI although it would still be returned in a call to GET CustomerAddressPreferences. If false, the shipping address is also displayed in the UI and, if the account level settings are set to show the shipping address, both addresses will appear on all invoices. Note that shipping instructions will appear in the notes section of all invoices.

billingAddress

Object. Defined in Shipping/Billing Address Object

The billing address

shippingAddress

Object. Defined in Shipping/Billing Address Object

The shipping address

id

Integer

The Fusebill generated ID of the customer

[Read Only]

uri

String

Full path to the customer address preference object.

[Read Only]

Suggest Edits

Read Address Preferences

This function allows you to retrieve customer address preferences by ID.

 
gethttps://secure.fusebill.com/v1/customerAddressPreferences/customerId
 

Path Parameters

Field
Data Type
Description

customerId

Integer

This is the Fusebill ID for the customer you want to retrieve address information for.

Examples
curl -X GET "https://secure.fusebill.com/v1/customerAddressPreferences/{customerId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id Field Returned by Create/Update customer
int pathParameter = {customerId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerAddressPreferences/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI, Payload and Headers
r = requests.get('https://secure.fusebill.com/v1/customerAddressPreferences/{id}', headers=headers)
print(r.content)
Response
{
	"contactName": "Frank",
	"shippingInstructions": null,
	"useBillingAddressAsShippingAddress": true,
	"billingAddress": null,
	"shippingAddress": null,
	"id": 84072,
	"uri": "https://secure.fusebill.com/v1/customerAddressPreferences/84072"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Suggest Edits

Update Address Preferences

This function allows you to edit a customer address preferences resource. The id field in the body is the ID of the customer you wish to update the preferences for.

 
puthttps://secure.fusebill.com/v1/CustomerAddressPreferences
 

Customer Address Preferences Fields

Field
Data Type
Description

id

Integer

This is the Customer ID (Fusebill ID) of the custom to whom these preferences apply.

shippingInstructions

String

This free field allows you to specify instructions for shipping. [Max Length: 50 characters]

useBillingAsShipping

Boolean

This determins if this resource will have both a shipping and billing address or if it will use the billing address for both.

contactName

String

This field can be used to store the contact name of the recipient, if different from the name stored in the address. [Max Length: 50 characters]

Examples
curl -X PUT "https://secure.fusebill.com/v1/CustomerAddressPreferences" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerId:{customerId},contactname:'John',shippingInstructions:'Signature required.',useBillingAddressAsShippingAddress:true,billingAddress:null,shippingAddres:null}"
//Json data, Fusebill Id which corresponds to the customerId Field
string jsonData = "{id:{customerId},contactname:'John',shippingInstructions:'Signature required.',useBillingAddressAsShippingAddress:true,billingAddress:null,shippingAddres:null}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/CustomerAddressPreferences");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"contactName":"John 

Doe","shippingInstructions":None,"useBillingAddressAsShippingAddress":"true","billingAddress":None,"shippingAddress":None,"id":{id},"uri":"https://stg-

secure.fusebill.com/v1/CustomerAddressPreferences/{id}"}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/customerAddressPreferences', data=json.dumps(payload), headers=headers)
print(r.content)
{
    "contactName": "Alex Goldstien",
    "shippingInstructions": "Leave package by the side door",
    "useBillingAddressAsShippingAddress": true,
    "billingAddress": {
        "customerAddressPreferenceId": 654144,
        "companyName": "Electricity Inc",
        "line1": "10 April Rd",
        "line2": "Unit A",
        "countryId": null,
        "country": null,
        "stateId": null,
        "state": "New York",
        "city": "New York",
        "postalZip": "12345",
        "addressType": "Billing",
        "valid": true,
        "id": 262515,
        "uri": "https://secure.fusebill.com/v1/addresses/262515"
    },
    "shippingAddress": null,
    "id": 654144,
    "uri": "https://secure.fusebill.com/v1/customeraddresspreferences/654144"
}
Response
{
	"contactName": "Frank",
	"shippingInstructions": "signature required",
	"useBillingAddressAsShippingAddress": true,
	"billingAddress": null,
	"shippingAddress": null,
	"id": 84072,
	"uri": "https://secure.fusebill.com/v1/customerAddressPreferences/84072"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "customerAccountPreference.useBillingAddressAsShippingAddress",
            "Value": "Error converting value {null} to type 'System.Boolean'. Path 'useBillingAddressAsShippingAddress', line 4, position 46."
        }
    ]
}
Suggest Edits

Shipping/Billing Address Object

In Fusebill, customers can have 2 distinct addresses, one for their billing details and optionally one for shipping. The billing address is where invoices would be sent when physically mailing invoices to customers while the shipping address would be used if physical goods were to be shipped to customers. The billing address must always exist on a customer before the shipping address.

 

Address Object Fields

Property
Type
Description

customerAddressPreferenceId

Integer

The Fusebill generated ID of the customer this address object belongs to.

[Read Only]

companyName

String

The company name if applicable.

[Max Length: 255 characters]

line1

String

standard line 1 of an address.

[Max Length: 60 characters]

line2

String

standard line 2 of an address.

[Max Length: 60 characters]

countryId

Integer

The ID of the country. Retrievable with the Read Country ID call.

country

String

The name of the country.

[Read Only]

stateId

Integer

The ID of the state, province, or territory. Retrievable with the Read Country ID call.

state

String

The name of the state, province, or territory.

[Read Only]

city

String

The city name.

[Max Length: 50]

postalZip

String

The postal code or zip code.

[Max Length: 10]

addressType

Enum: {"Billing", "Shipping"}

In Fusebill a customer can have up to one billing and up to one shipping address

valid

Boolean

Indicates the validity of the address.

id

Integer

The Fusebill generated ID for this address object.

[Read Only]

uri

String

The full path to this resource.

[Read Only]

Simplified Workflows

A customer address can also be added in the initial customer creation POST

Suggest Edits

Read Ship/Bill Address

This function is used to retrieve an address. Addresses are retrieved by their unique ID.

Our shipping and billing address calls accept a variety of values for the Country ID and State ID key-value pairs. The Country ID and State ID fields allow you to use standard ISO 3166-2 Numeric and Subdivision ISO codes. ISO standards are defined and maintained by ISO 3166/MA. For your convenience, we have included downloads of these codes here:

Country Reference List

 
gethttps://secure.fusebill.com/v1/Addresses/addressId
 

Path Parameters

Property
Type
Description

addressId

Integer

The Fusebill generated ID that uniquely identifies this address

Examples
curl -X GET "https://secure.fusebill.com/v1/Addresses/{addressId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter
int pathParameter = {addressId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/Addresses/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://stg-secure.fusebill.com/v1/addresses/{id}', headers=headers)
print(r.content)
Response
{
	"customerAddressPreferenceId": 84636,
	"companyName": "DarkSide",
	"line1": "117 Waba Road",
	"line2": null,
	"countryId": 124,
	"country": "Canada",
	"stateId": 9,
	"state": "Ontario",
	"city": "Pakenham",
	"postalZip": "K0A2X0",
	"addressType": "Billing",
	"id": 63406,
	"uri": "https://secure.fusebill.com/v1/addresses/63406"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Address with id 1 not found."
        }
    ]
}
Suggest Edits

Create Ship/Bill Address

This function is used to create a new address resource. The address is linked to a specific customer when it is created.

When posting a new address, Fusebill accepts a variety of values for the Country ID and State ID key-value pairs. The Country ID and State ID fields allow you to use standard ISO 3166-2 Numeric and Subdivision ISO codes. ISO standards are defined and maintained by ISO 3166/MA. For your convenience, we have included downloads of these codes here:

Country Reference List

 
posthttps://secure.fusebill.com/v1/Addresses
 

Shipping and Billing Address Fields

Field
Data Type
Description
Required

customerAddressPreferenceId

Integer

This is the Fusebill generated customer ID.

Yes

companyName

String

The company name if applicable.
[Max Length: 255]

Optional

line1

String

standard line 1 of an address.

[Max Length: 60]

Optional

line2

String

standard line 2 of an address.

[Max Length: 60]

Optional

countryId

Integer

The ID of the country. Retrievable with the Read Country ID call.

Optional

stateId

Integer

The ID of the state, province, or territory. Retrievable with the Read Country ID call.

Optional

city

String

The city of the Customer.

Optional

postalZip

String

The postal code or zip code.

[Max Length: 10]

Optional

addressType

Enum: {Billing, Shipping}

In Fusebill a customer can have up to one billing and up to one shipping address

Yes

Examples
curl -X POST "https://secure.fusebill.com/v1/Addresses" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerAddressPreferenceId:{customerId},companyName:'Fusebill',line1:'232 Herzberg Road',line2:'Suite 203',countryId:124,country:'Canada',stateId:9,state:'Ontario',city:'Kanata',postalZip:'K2K 2A1',addressType:'Billing'}"
//Json data, Fusebill Id which corresponds to the customerId Field
string jsonData ="{customerAddressPreferenceId:{customerId},companyName:'Fusebill',line1:'232 Herzberg Road',line2:'Suite 203',countryId:124,country:'Canada',stateId:9,state:'Ontario',city:'Kanata',postalZip:'K2K 2A1',addressType:'Billing'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Addresses");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"customerAddressPreferenceId":{id},"companyName":'Fusebill',"line1":'232 Herzberg Road',"line2":'Suite 
203',"countryId":124,"country":'Canada',"stateId":9,"state":'Ontario',"city":'Kanata',"postalZip":'K2K 2A1',"addressType":'Billing'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/addresses', data=json.dumps(payload), headers=headers)
print(r.content)
{
"CustomerAddressPreferenceId": 652929,
"companyName": "Electricity Inc",
"line1": "10 March Rd",
"line2": "Unit A",
"state": "New York",
"city": "New York",
"postalZip": 12345,
"addressType": "Shipping"
}
Response
{
		"customerAddressPreferenceId": 84636,
		"companyName": "DarkSide",
		"line1": "117 Waba Road",
		"line2": null,
		"countryId": 124,
		"country": "Canada",
		"stateId": 9,
		"state": "Ontario",
		"city": "Pakenham",
		"postalZip": "K0A2X0",
		"addressType": "Billing",
		"id": 63406,
		"uri": "https://secure.fusebill.com/v1/addresses/63406"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Only 1 Billing Address is allowed per customer. Please update it instead."
        }
    ]
}
Suggest Edits

Update Ship/Bill Address

This function is used to update an address resource. The address is linked to a specific customer when it is created.

Our shipping and billing address calls accept a variety of values for the Country ID and State ID key-value pairs. The Country ID and State ID fields allow you to use standard ISO 3166-2 Numeric and Subdivision ISO codes. ISO standards are defined and maintained by ISO 3166/MA. For your convenience, we have included downloads of these codes here:

Country Reference List

 
puthttps://secure.fusebill.com/v1/Addresses
 

Request Parameters

Field
Data Type
Description

companyName

String

The company name if applicable.
[Max Length: 255]

line1

String

standard line 1 of an address.

[Max Length: 60]

line2

String

standard line 2 of an address.

[Max Length: 60]

countryId

Integer

The ID of the country. Retrievable with the Read Country ID call.

stateId

Integer

The ID of the state, province, or territory. Retrievable with the Read Country ID call.

city

String

The city of the Customer.

postalZip

String

The postal code or zip code.

[Max Length: 10]

id

Integer

The Fusebill generated ID of the address

Examples
curl -X PUT "https://secure.fusebill.com/v1/Addresses" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerAddressPreferenceId:{customerId},id:{addressId},companyName:'Fusebill',line1:'232 Herzberg Road',line2:'Suite 203',countryId:124,country:'Canada',stateId:9,state:'Ontario',city:'Kanata',postalZip:'K2K 2A1',addressType:'Billing'}"
//Json data, Fusebill Id which corresponds to the customerId Field
string jsonData ="{customerAddressPreferenceId:{customerId},id:{addressId},companyName:'Fusebill',line1:'232 Herzberg Road',line2:'Suite 203',countryId:124,country:'Canada',stateId:9,state:'Ontario',city:'Kanata',postalZip:'K2K 2A1',addressType:'Billing'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Addresses");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload ={"customerAddressPreferenceId":{id},"companyName":None,"line1":"","line2":None,"countryId":None,"country":None,"stateId":None,"state":None,"city":"","post
alZip":"","addressType":"Billing","id":{id},"uri":"https://stg-secure.fusebill.com/v1/addresses/{id}"}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/customerAddressPreferences', data=json.dumps(payload), headers=headers)
print(r.content)
{
    "customerAddressPreferenceId": 650594,
    "companyName": "EchoFoxtrot",
    "line1": "10 Jupiter Ave.",
    "line2": "suite 98",
    "countryId": 124,
    "country": "Canada",
    "stateId": 2,
    "state": "British Columbia",
    "city": "Vancouver",
    "postalZip": "V9C4V2",
    "addressType": "Billing",
    "valid": true,
    "id": 260543,
    "uri": "https://stg-secure.fusebill.com/v1/addresses/260543"
}
Response
{
	"customerAddressPreferenceId": 84421,
	"companyName": "DarkSide Inc.",
	"line1": "768 Farside",
	"line2": null,
	"countryId": "124",
	"country": "Canada",
	"stateId": 9,
	"state": "Ontario",
	"city": "Ottawa",
	"postalZip": "K3Y9Y7",
	"addressType": "Billing",
	"id": 63406
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Address with id 12 not found."
        }
    ]
}
Suggest Edits

Read Country ID

Returns a list of country IDs (and the IDs of their states/provinces) for use in address-related API calls.

 
gethttps://secure.fusebill.com/v1/Countries
 
Examples
curl -X PUT "https://secure.fusebill.com/v1/Countries" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter
int pathParameter = {addressId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Countries/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/Countries', headers=headers)
print(r.content)
Response
[
    {
        "id": 840,
        "name": "United States",
        "iso": "US",
        "iso3": "USA",
        "states": [
            {
                "id": 100,
                "name": "AA",
                "subdivisionIsoCode": "AA",
                "combinedIsoCode": "US-AA"
            },
            {
                "id": 101,
                "name": "AE",
                "subdivisionIsoCode": "AE",
                "combinedIsoCode": "US-AE"
            },
            {
                "id": 15,
                "name": "Alabama",
                "subdivisionIsoCode": "AL",
                "combinedIsoCode": "US-AL"
            },
            {
                "id": 14,
                "name": "Alaska",
                "subdivisionIsoCode": "AK",
                "combinedIsoCode": "US-AK"
            },
            {
                "id": 102,
                "name": "AP",
                "subdivisionIsoCode": "AP",
                "combinedIsoCode": "US-AP"
            },
          
          
          ...
Suggest Edits

Subscription Object

Many systems use plan and subscription as interchangeable terms when discussing recurring billing but in Fusebill a plan and a subscription are very different.

Plans should be thought of as templates for a service you want to sell to your customers. A subscription is the actual implementation of a plan when that plan is attached to a customer. Changes to a plan do not change the subscriptions created from that plan and changes made to a subscription have no effect on the plan they were created from.

In addition, plans can have multiple frequencies (every 2 months, every 4 months, every 1 year, etc). Subscriptions are instances of a particular frequency of a particular plan, so a subscription has only one frequency regardless of how many frequencies were in the plan from which the subscription was created.

 

Subscription Object Fields

Property
Type
Description

customerId

Integer

This is the Id of the Customer to whom this Subscription has been applied.

[Read Only]

planFrequency

Object (definition below)

This provides details of the plan frequency that was used to configure the subscription.

[Read Only]

planCode

String

This is the unique code which represents the Plan of which this Subscription is an instance.

[Read Only]

planName

String

This is the name of the plan of which this Subscription is an instance.

[Read Only]

planDescription

String

This is the description text of the Plan of which this Subscription is an instance of.

[Read Only]

planReference

String

This is a text field which will be populated with the reference text from the plan. This field is not exposed on the Invoice.

[Read Only]

status

Enum: {Active, Draft, Cancelled, Provisioning, Expired, Migrated, Suspended}

This is the status of this subscription. Draft indicates that the Subscription has not yet been activated. Provisioning indicates this Subscription has been provisioned but that the Setup Fee and recurring Charge has not been applied to the Customer. To set a Subscription as "Provisioned" you must set a Scheduled Activation Date for some time in the future.

reference

String

This is a text field you can populate with reference text for this subscription. This field is not exposed on the Invoice.

[Max Length: 255 characters]

subscriptionOverride

Object. Defined below

This represents a subscription-level override made after the object's creation.

hasPostedInvoice

Boolean

This indicates if this Subscription has caused an invoice to be created and posted against the Customer's account.

[Read Only]

CreatedTimestamp

DateTime

This indicates when the Subscription was created.

[Read Only]

ActivatedTimestamp

DateTime

This indicates when the Subscription was activated.

[Read Only]

ProvisionedTimestamp

DateTime

This indicates when the Subscription was provisioned.

[Read Only]

NextPeriodStartDate

DateTime

This indicates when the next billing period for the Subscription will begin. Normally, this indicates when the subscription will bill and apply charges to the customer's account.

[Read Only]

lastPeriodStartDate

DateTime

This is the timestamp of when the previous period started for this subscription if there was a previous period.

[Read Only]

ScheduledActivationTimestamp

DateTime

If set, this indicates when the Subscription should activate. The subscription will automatically be set to an "Active" status at this time if it has been set to status "Provisioned".

subscriptionProducts

List of Objects. See the Subscription Products Object section for the definition.

The list of subscription products on the purchase, both included and excluded.

remainingInterval

Integer

This is the remaining number of billing intervals in the lifetime of this subscription. If this value is set to null the subscription will renew indefinitely. If this is set to a number then after that number of intervals have passed the subscription will go to the "Expired" status automatically and stop charging the customer.

remainingIntervalPushOut

Integer

This is the setting to default what the new remaining interval should be when the subscription is renewed.

openSubscriptionPeriodEndDate

DateTime

This is the date that the current billing period will end. Often, this field will match the nextPeriodStartDate value.

customFields

List of Objects. See Catalog: Custom Fields for object definition.

Custom fields hold additional data. This data is associated with the subscription.

planAutoApplyChanges

Boolean

This field related to Grandfathering control. If true, this indicates that the Plan from which this Subscription is made usually pushes changes to the Plan down to existing Subscriptions - this forces existing customers onto the newest version of the Plan.
If set to False, this 'grandfathers' the Customer into the version of the Plan they Subscribed to and does not push changes.

[Read Only]

autoApplyCatalogChanges

Boolean

This field controls if this specific Subscription should automatically push changes to the underlying Plan to this Subscription. If set to True, changes will be pushed automatically. If False, this Subscription will not reflect updates to the Plan from which it was made.

monthlyRecurringRevenue

Decimal

The calculated monthly recurring revenue value being generated by this subscription

[Read Only]

netMonthlyRecurringRevenue

Decimal

The net MRR being generated by this subscription

[Read Only]

amount

Decimal

The amount of the subscription.

[Read Only]

contractStartTimestamp

DateTime

This is the date that the contract period will begin.

contractEndTimestamp

DateTime

This is the date that the contract period will end.

expiredTimestamp

DateTime

The timestamp of when this subscription expired if it is in status "Expired"

[Read Only]

modifiedTimestamp

DateTime

The timestamp of the last modification to this entity.

[Read Only]

coupons

List of Objects. See Subscriptions: Coupons Object for details.

The list of coupons that have been applied to this subscription

invoiceDay

Integer

The day of the month recharge occurs for this subscription.

[Read Only]

invoiceMonth

Integer

Tells the system to create a billing period that cycles on the specified month. Typically only used for yearly frequencies. If this parameter is used for a monthly frequency, Fusebill will adjust the billing period such that the subscription will recharge on the provided day and month.

[Read Only]

canMigrate

Boolean

True as long as their is at least one plan family relationship with this subscription's plan code as the source.

[Read Only]

migrationDate

DateTime

The timestamp when this subscription entered status "Migrated"

[Read Only]

scheduledMigrationDate

DateTime

The timestamp of when the scheduled migration for this subscription will occur if a migration has been scheduled.

subscriptionHasRecurringEndOfPeriodCharge

Boolean

True if the subscription has a recurring end of period charge

nextRechargeDate

DateTime

The timestamp for when this subscription will recharge next.

billingPeriodDefinitionId

Integer

The Fusebill generated ID that uniquely identifies the associated billing period definition.
[Read Only]

salesforceId

String

The Salesforce ID of the subscription in Salesforce that this object maps to. This is for the Salesforce plugin.

id

Integer

The Fusebill generated ID that uniquely identifies this subscription
[Read Only]

uri

String

The full string path to this resource
[Read Only]

PlanFrequency Fields

Property
Type
Description

planRevisionId

Integer

This is the unique identifier for this plan revision

[Read Only]

numberOfIntervals

Integer

This is the number of intervals that this plan will renew for

[Read Only]

interval

Enum:{Yearly, Monthly}

The unit of measurement used for defining billing periods

[Read Only]

numberOfSubscriptions

Integer

This is the number of instances of this plan currently in the system as subscriptions

[Read Only]

status

Enum: {Draft, Active, Retired}

Indicates the status of the plan this subscription was sourced from.

[Read Only]

isProrated

Boolean

This indicates if this Subscription should prorate its charges if activated in the middle of a billing cycle.

[Read Only]

prorationGranularity

Enum:{Monthly, Daily}

This defines how granular the proration calculations are

[Read Only]

planFrequencyUniqueId

Integer

This is an internal identifier.

[Read Only]

remainingInterval

Integer

The default remaining interval for the plan. This is the number of periods before expiry. This can be overwritten or pushed out on the subscription

[Read Only]

salesforceId

String

The ID of the Salesforce price book this plan frequency is associated with in Salesforce. This is for the Salesforce plugin.

id

Integer

This is the Fusebill generated ID for this plan frequency.

[Read Only]

uri

String

This is full string path to this resource.

[Read Only]

Subscription Override Properties

Property
Type
Description

name

String

This is the value which will override the planName field value on the subscription. This override value will appear on invoices and in other customer facing locations.

[Max Length: 100 characters]

description

String

This is the value which will override the planDescription field value on the subscription. This override value will appear on invoices and in other customer facing locations.

[Max Length: 500 characters]

id

Integer

The Fusebill generated ID that uniquely identifies this subscription

[Read Only]

uri

String

The full path to this subscription

[Read Only]

Suggest Edits

List Subscriptions

This function is used to retrieve a list of subscriptions. Since this will likely return a very large list, it is strongly recommended that pagination is used.

 
gethttps://secure.fusebill.com/v1/subscriptions/getAll?query=field:queryString
 

This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value

Parameter Name
Acceptable Values
Parameter Name
Acceptable Values

Amount

Decimal Range

planCode

String

contractEndTimestamp

Date Range

planDescription

String

contractStartTimestamp

Date Range

planName

String

createdTimestamp

Date Range

planReference

String

CurrentMrr

Decimal Range

provisionedTimestamp

Date Range

CurrentNetMrr

Decimal Range

reference

String

expiredTimestamp

Date Range

remainingInterval

Integer

interval

Monthly, Yearly

remainingIntervalPushOut

Integer

invoiceDay

Integer (1-31)

salesForceId

String

modifiedTimestamp

Date Range

scheduledActivationTimestamp

Date Range

MonthlyRecurringRevenue

Decimal Range

status

Active, Draft, Cancelled, Provisioning, Expired

NetMRR

Decimal Range

This call supports Pagination (Read More)
&pageSize=100&pageNumber=0
This call supports Sorting Read More
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl –X GET https://secure.fusebill.com/v1/subscriptions/getAll?pageSize=20&pageNumber=3\ 
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}" 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptions/getAll?pageSize=20&pageNumber=3"); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "GET"; 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
{ 
  result = streamReader.ReadToEnd(); 
}  
#Import library JSON 
import json 
#Import library Requests 
import requests 
#Pass in a dictionary to the Headers parameter 
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'} 
#Pass in your URI and Headers 
r = requests.get('https://secure.fusebill.com/v1/subscriptions/getAll?pageSize=20&pageNumber=3,  headers=headers) 
print(r.content) 
Response
[  
   {  
      "customerId":172677,
      "planFrequency":{  
         "planRevisionId":122453,
         "numberOfIntervals":1,
         "interval":"Monthly",
         "numberOfSubscriptions":1,
         "status":"Active",
         "setupFees":[  
            {  
               "amount":10.0,
               "currency":"USD",
               "id":0,
               "uri":null
            }
         ],
         "charges":[  
            {  
               "amount":2.0,
               "currency":"USD",
               "id":0,
               "uri":null
            }
         ],
         "isProrated":false,
         "prorationGranularity":null,
         "planFrequencyUniqueId":114,
         "remainingInterval":null,
         "id":114,
         "uri":null
      },
      "planCode":"BSC2",
      "planName":"Basic",
      "planDescription":"Basic Monthly Services for Kennedy Consulting",
      "planReference":null,
      "status":"Cancelled",
      "reference":null,
      "subscriptionOverride":null,
      "hasPostedInvoice":true,
      "createdTimestamp":"2017-01-11T18:35:37",
      "activatedTimestamp":null,
      "provisionedTimestamp":"2017-01-11T19:07:57",
      "nextPeriodStartDate":null,
      "scheduledActivationTimestamp":"2017-02-01T05:00:00",
      "subscriptionProducts":[  

      ],
      "remainingInterval":null,
      "remainingIntervalPushOut":null,
      "openSubscriptionPeriodEndDate":null,
      "chargeDiscount":null,
      "setupFeeDiscount":null,
      "chargeDiscounts":[  

      ],
      "setupFeeDiscounts":[  

      ],
      "customFields":null,
      "planAutoApplyChanges":false,
      "autoApplyCatalogChanges":false,
      "monthlyRecurringRevenue":0.0000,
      "netMonthlyRecurringRevenue":0.0000,
      "amount":12.0000,
      "contractStartTimestamp":null,
      "contractEndTimestamp":null,
      "expiredTimestamp":null,
      "coupons":[  

      ],
      "subscriptionHasRecurringEndOfPeriodCharge":false,
      "id":122453,
      "uri":"https://secure.fusebill.com/v1/subscriptions/122453"
   }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Bad request, the query is not valid.  Please check your request and try again."
        }
    ]
}
Suggest Edits

List Subscription Summary

This action will retrieve a list of summarized subscriptions. The subscriptions returned will be from a search on the entire customer base. For example, a call can be made to retrieve a list of all active subscriptions for all customers on your account. Since this will likely return a very large list, it is strongly recommended that pagination is used.

 
gethttps://secure.fusebill.com/v1/subscriptionSummary?query=field:queryString
 

This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value

Parameter Name
Acceptable Values
Parameter Name
Acceptable Values

activatedTimestamp

Date Range

name

String

cancellationTimestamp

Date Range

nextBillingDate

Date Range

canMigrate

Boolean

nextPeriodStartDate

Date Range

contractEndTimestamp

Date Range

numberOfInterval

Integer

contractStartTimestamp

Date Range

planCode

String

createdTimestamp

Date Range

planId

Integer

description

String

provisionedTimestamp

Date Range

expiryDate

Date Range

Reference

String

interval

Monthly, Yearly

remainingInterval

Integer

lastBillingDate

Date Range

scheduledActivationTimestamp

Date Range

modifiedTimestamp

Date Range

scheduledMigrationDate

Date Range

MonthlyRecurringRevenue

Decimal Range

subscriptionStatus

Active, Draft, Cancelled, Provisioning, Expired

NetMonthlyRecurringRevenue

Decimal Range

suspendedTimestamp

Date Range

This call supports pagination (Read More)
&pageSize=100&pageNumber=0
This call supports sorting Read More
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl -X GET "https://secure.fusebill.com/v1/subscriptionSummary" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
 //Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptionSummary");
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/subscriptionSummary', headers=headers)
print(r.content)
Response
[ 
   { 
      "customerId":129076,
      "planCode":"onlineaccessplan",
      "name":"Online Access Plan",
      "description":null,
      "reference":"1236",
      "interval":"Monthly",
      "numberOfInterval":1,
      "subscriptionStatus":"Active",
      "monthlyRecurringRevenue":0,
      "netMonthlyRecurringRevenue":0,
      "lastBillingDate":"2016-07-09T17:00:24",
      "nextBillingDate":"2016-08-09T04:00:00",
      "expiryDate":null,
      "scheduledActivationTimestamp":null,
      "cancellationTimestamp":null,
      "suspendedTimestamp":null,
      "createdTimestamp":"2016-07-09T17:00:11",
      "modifiedTimestamp": "2019-09-29T04:01:23.73",
      "activatedTimestamp":"2016-07-09T17:00:24",
      "provisionedTimestamp":null,
      "nextPeriodStartDate":"2016-08-09T04:00:00",
      "contractStartTimestamp":null,
      "contractEndTimestamp":null,
      "remainingInterval":null,
      "id":83907,
      "uri":"https://secure.fusebill.com/v1/subscriptionsummary/83907/"
   }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Bad request, the query is not valid.  Please check your request and try again."
        }
    ]
}
Suggest Edits

List Subscriptions By Customer

This function is used to retrieve a list of subscriptions belonging to a customer. That customer is specified by the Fusebill generated ID.

 
gethttps://secure.fusebill.com/v1/customers/customerId/subscriptions?query=parameterName:value
 

Path Parameters

Property
Type
Description

customerId

Integer

This is the ID of the Customer who owns the Subscriptions.

This call supports string filtering (Read More) and datetime/numeric range filtering (Read More)
&query=parameterName:Value

Parameter Name
Acceptable Values
Parameter Name
Acceptable Values

Amount

Decimal Range

planCode

String

contractEndTimestamp

Date Range

planDescription

String

contractStartTimestamp

Date Range

planName

String

createdTimestamp

Date Range

planReference

String

CurrentMrr

Decimal Range

provisionedTimestamp

Date Range

CurrentNetMrr

Decimal Range

reference

String

expiredTimestamp

Date Range

remainingInterval

Integer

interval

Monthly, Yearly

remainingIntervalPushOut

Integer

invoiceDay

Integer (1-31)

salesForceId

String

modifiedTimestamp

Date Range

scheduledActivationTimestamp

Date Range

MonthlyRecurringRevenue

Decimal Range

status

Active, Draft, Cancelled, Provisioning, Expired

NetMRR

Decimal Range

This call supports Pagination (Read More)
&pageSize=100&pageNumber=0
This call supports Sorting Read More
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl -X GET "https://secure.fusebill.com/v1/customers/{customerId}/subscriptions" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter, FusebillId
int pathParameter = {customerId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/"+pathParameter+"/subscriptions");
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
} 
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/customers/{id}/subscriptions', headers=headers)
print(r.content)
Response
[  
   {  
      "customerId":172677,
      "planFrequency":{  
         "planRevisionId":122453,
         "numberOfIntervals":1,
         "interval":"Monthly",
         "numberOfSubscriptions":1,
         "status":"Active",
         "setupFees":[  
            {  
               "amount":10.0,
               "currency":"USD",
               "id":0,
               "uri":null
            }
         ],
         "charges":[  
            {  
               "amount":2.0,
               "currency":"USD",
               "id":0,
               "uri":null
            }
         ],
         "isProrated":false,
         "prorationGranularity":null,
         "planFrequencyUniqueId":114,
         "remainingInterval":null,
         "id":114,
         "uri":null
      },
      "planCode":"BSC2",
      "planName":"Basic",
      "planDescription":"Basic Monthly Services for Kennedy Consulting",
      "planReference":null,
      "status":"Cancelled",
      "reference":null,
      "subscriptionOverride":null,
      "hasPostedInvoice":true,
      "createdTimestamp":"2017-01-11T18:35:37",
      "activatedTimestamp":null,
      "provisionedTimestamp":"2017-01-11T19:07:57",
      "nextPeriodStartDate":null,
      "scheduledActivationTimestamp":"2017-02-01T05:00:00",
      "subscriptionProducts":[  

      ],
      "remainingInterval":null,
      "remainingIntervalPushOut":null,
      "openSubscriptionPeriodEndDate":null,
      "chargeDiscount":null,
      "setupFeeDiscount":null,
      "chargeDiscounts":[  

      ],
      "setupFeeDiscounts":[  

      ],
      "customFields":null,
      "planAutoApplyChanges":false,
      "autoApplyCatalogChanges":false,
      "monthlyRecurringRevenue":0.0000,
      "netMonthlyRecurringRevenue":0.0000,
      "amount":12.0000,
      "contractStartTimestamp":null,
      "contractEndTimestamp":null,
      "expiredTimestamp":null,
      "coupons":[  

      ],
      "subscriptionHasRecurringEndOfPeriodCharge":false,
      "id":122453,
      "uri":"https://secure.fusebill.com/v1/subscriptions/122453"
   }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Bad request, the query is not valid.  Please check your request and try again."
        }
    ]
}
Suggest Edits

Read Subscription

This action will return a Subscription response for a given Subscription ID. Note, setting the "PriceUpliftsEnabled" key-value to "False" from a previous value of "True" will delete existing, future and historical price uplifts.

 
gethttps://secure.fusebill.com/v1/subscriptions/subscriptionId
 

Path Parameters

Property
Type
Description

subscriptionId

Integer

The Fusebill generated ID that uniquely identifies this subscription object

Examples
curl -X GET "https://secure.fusebill.com/v1/subscriptions/{subscriptionId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//query parameter
int queryParameter = {subscriptionId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptions/"+queryParameter);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}       
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/subscriptions/{id}', headers=headers)
print(r.content)
Response
{
    "customerId": 186838,
    "planFrequency": {
        "planRevisionId": 177229,
        "numberOfIntervals": 1,
        "interval": "Monthly",
        "numberOfSubscriptions": 1,
        "status": "Active",
        "setupFees": [
        ],
        "charges": [
        ],
        "isProrated": false,
        "prorationGranularity": null,
        "planFrequencyUniqueId": 4791,
        "remainingInterval": null,
        "id": 4791,
        "uri": null
    },
    "planCode": "simplemonthly",
    "planName": "Simple Monthly",
    "planDescription": null,
    "planReference": null,
    "status": "Active",
    "reference": null,
    "subscriptionOverride": null,
    "hasPostedInvoice": true,
    "createdTimestamp": "2017-04-05T17:11:10",
    "activatedTimestamp": "2017-04-05T17:15:11",
    "provisionedTimestamp": null,
    "nextPeriodStartDate": "2017-04-10T04:00:00",
    "scheduledActivationTimestamp": null,
    "subscriptionProducts": [
        {
            "subscriptionId": 177229,
            "planProduct": {
                "status": "Active",
                "productId": 16758,
                "planId": 2804,
                "productCode": "recurringmonthlyproduct",
                "productName": "Recurring Monthly Product",
                "productStatus": "Active",
                "productDescription": null,
                "productType": "RecurringService",
                "productGLCode": "",
                "quantity": 1,
                "maxQuantity": null,
                "isRecurring": true,
                "isFixed": false,
                "isOptional": true,
                "isIncludedByDefault": false,
                "isTrackingItems": false,
                "chargeAtSubscriptionActivation": true,
                "orderToCashCycles": [
                    {
                        "planFrequencyId": 4791,
                        "planProductId": 18374,
                        "numberOfIntervals": 1,
                        "interval": "Monthly",
                        "chargeModels": [
                            {
                                "chargeModelType": "Signup",
                                "chargeTimingType": "StartOfPeriod",
                                "prorationGranularity": "Daily",
                                "prorateOnPositiveQuantity": false,
                                "prorateOnNegativeQuantity": false,
                                "reverseChargeOnNegativeQuantity": false,
                                "id": 970993,
                                "uri": null
                            },
                            {
                                "chargeModelType": "Lifetime",
                                "chargeTimingType": "Immediate",
                                "prorationGranularity": "Daily",
                                "prorateOnPositiveQuantity": false,
                                "prorateOnNegativeQuantity": false,
                                "reverseChargeOnNegativeQuantity": false,
                                "id": 970993,
                                "uri": null
                            }
                        ],
                        "remainingInterval": null,
                        "groupQuantityChangeCharges": false,
                        "planProductPriceUplifts": null,
                        "customServiceDateNumberOfIntervals": 1,
                        "customServiceDateInterval": "Periods",
                        "customServiceDateProjection": "Future",
                        "earningInterval": "Monthly",
                        "earningNumberOfIntervals": 1,
                        "earningTimingInterval": "Daily",
                        "earningTimingType": "StartOfInterval",
                        "pricingModel": {
                            "pricingModelType": "Standard",
                            "quantityRanges": [
                                {
                                    "min": 0,
                                    "max": null,
                                    "prices": [
                                        {
                                            "amount": 20,
                                            "currency": "USD",
                                            "id": 970993,
                                            "uri": null
                                        }
                                    ],
                                    "id": 0,
                                    "uri": null
                                }
                            ],
                            "id": 970993,
                            "uri": null
                        },
                        "id": 970993,
                        "uri": null
                    }
                ],
                "resetType": "Never",
                "planProductUniqueId": 18108,
                "generateZeroDollarCharge": false,
                "id": 18374,
                "uri": ""
            },
            "quantity": 1,
            "isIncluded": true,
            "startDate": null,
            "subscriptionProductOverride": null,
            "subscriptionProductPriceOverride": null,
            "chargeAtSubscriptionActivation": true,
            "isCharged": true,
            "subscriptionProductDiscount": null,
            "subscriptionProductDiscounts": [
            ],
            "customFields": null,
            "monthlyRecurringRevenue": 20,
            "netMonthlyRecurringRevenue": 20,
            "amount": 20,
            "status": "Active",
            "lastPurchaseDate": null,
            "earningSettings": {
                "earningTimingInterval": "Daily",
                "earningTimingType": "StartOfInterval"
            },
            "remainingInterval": null,
            "groupQuantityChangeCharges": false,
            "priceUpliftsEnabled": false,
            "priceUplifts": [
            ],
            "historicalPriceUplifts": [
            ],
            "customServiceDateNumberOfIntervals": 1,
            "customServiceDateInterval": "Periods",
            "customServiceDateProjection": "Future",
            "generateZeroDollarCharge": false,
            "id": 970993,
            "uri": "https://secure.fusebill.com/v1/SubscriptionProducts/970993"
        }
    ],
    "remainingInterval": null,
    "remainingIntervalPushOut": null,
    "openSubscriptionPeriodEndDate": "2017-04-10T04:00:00",
    "chargeDiscount": null,
    "setupFeeDiscount": null,
    "chargeDiscounts": null,
    "setupFeeDiscounts": null,
    "customFields": null,
    "planAutoApplyChanges": false,
    "autoApplyCatalogChanges": false,
    "monthlyRecurringRevenue": 20,
    "netMonthlyRecurringRevenue": 20,
    "amount": 20,
    "contractStartTimestamp": null,
    "contractEndTimestamp": null,
    "expiredTimestamp": null,
    "coupons": [
    ],
    "subscriptionHasRecurringEndOfPeriodCharge": false,
    "id": 177229,
    "uri": "https://secure.fusebill.com/v1/subscriptions/177229"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Subscription with id 123 not found."
        }
    ]
}
Suggest Edits

Create Subscription

This action will create a new Subscription. Subscriptions are applied to specific Customers, identified by the customerId field, and are instances of a specific frequency of a specific Plan, identified by the planFrequencyId below.

When you create a Subscription you have the option of providing a subscriptionOverride. This override will allow you to change the name and description of the subscription, as it appears on the Customer's invoice.

Creating a Subscription will include all the Products in the associated Plan in the newly created Subscription. You can Edit the Subscription if you wish to modify aspects of the Products. See the Update Subscription page for more details.

Subscriptions have a status of Draft when created and you will need to perform an additional action to Activate the Subscription. See the Activate Subscription page for details. Coupons can be provided when creating the subscription using the "couponCodes" value.

The minimum request key-value pairs for a successful include fields "customerID" and "PlanFrequencyID".

 
posthttps://secure.fusebill.com/v1/subscriptions?view=view&preview=preview&currency=currency
 

This action will return the full Subscription object of the newly created Subscription. To include the full invoice in the response, include the parameter ?view=sideeffects as shown below

URL Parameters

Parameter Name
Type
Description
Required

view

Enum: {
sideeffects
}

When included and set to "sideeffects" the response will include a sideeffects object showing the resulting draft invoice

Optional

preview

Boolean

If true, no subscription will be created. Instead a preview subscription will be returned containing an invoicePreview object

Optional

currency

3 character ISO currency code

If preview is set to true and no customerId is supplied in the body, this is a way to preview the invoice in the specified currency specified. The currency must be configured for your Fusebill account

Optional

Request Parameters

Property
Type
Description
Required

customerID

Integer

This is the Fusebill ID of the customer.

Yes, unless preview=true is set

taxationAddress

Object. Defined below

If preview=true this address is used to calculate taxes for the draft invoice preview. This allows for a tax preview without needing a customer ID.

Optional

planFreqencyID

Integer

This is the plan frequency ID that this subscription is based off

Yes

subscriptionOverride

Object. Defined below.

This is an override of the name and description of this subscription if it differs from the plan

Optional

reference

String

This will appear as the 3rd line item in the main subscription header on an invoice [Max Length: 255 characters]

Optional

scheduledActivationTimestamp

DateTime

It will accept a scheduled date in the future identifying when to Activate Subscription if it is placed into "Provisioning" Status. The submitted DateTime will automatically be interpreted in your account timezone. This field should be omited if the subscription should not be scheduled to activate in the future.

Optional

remainingInterval

Decimal

Number of billing intervals that can iterate before the subscription status is set to "Expired".

Optional

remainingIntervalPushOut

Decimal

Number of billing intervals that are added to the Remaining interval counter whenever the expiry pushout button is pressed by the customer via the Self-Service-Portal

Optional

contractStartTimestamp

DateTime

This is the string of the contract start date returned in subscription reports

Optional

contractEndTimestamp

DateTime

This is the string of the contract end date returned in subscription reports

Optional

billingPeriodID

Integer

The unique id of an existing billing period on the customer that the subscription should be assigned to

Optional

invoiceDay

Integer (1-28)

Tells the system to create a billing period that cycles on the specified day and assign this subscription to it

Optional

invoiceMonth

Integer (1-12)

Tells the system to create a billing period that cycles on the specified day and month and assign this subscription to it. This parameter can only be used for subscriptions with an annual frequency

Optional

couponCodes

List of Strings

Can hold a list of coupon codes to be automatically applied to the subscription at time of creation, Coupons can be pre-configured to apply specific discounts to specific subscription products on the subscription

Optional

subscriptionProducts

List of objects. Defined below

Specifying a list of subscription product objects allows upfront overrides of certain plan product fields. This would not allow a means of providing additional products not specified as available in the underlying plan. Not providing this list means the collection of subscription products will have default settings.

Optional

Taxation Address Fields

Property
Type
Description

line1

String

standard line 1 of an address.

[Max Length: 60]

line2

String

standard line 1 of an address.

[Max Length: 60]

countryId

Integer

The ID of the country. Retrievable with the Read Country ID call.

stateId

Integer

The ID of the state, province, or territory. Retrievable with the Read Country ID call.

city

String

The city of the Customer.

postalZip

String

The postal code or zip code.

[Max Length: 10]

Subscription Override Fields

Property
Type
Description

Name

String

This is the value which will override the PlanName field value. This override value will appear on invoices and in other Customer facing locations. [Max Length: 100 characters]

Description

String

This is the value which will override the PlanDescription field value. This override value will appear on invoices and in other Customer facing locations. [Max Length: 500 characters]

Subscription Products

Property
Type
Description

planProductUniqueId

Integer

The Fusebill plan product unique ID. This is not the same as the plan product ID.

name

String

A name override for the subscription product [Max Length: 100 characters]

description

String

A description override for the subscription product [Max Length: 500 characters]

quantity

Decimal

The quantity of the subscription product. Used for pricing calculations

isIncluded

Boolean

If the subscription product is optional, this dictates its inclusion

price

Decimal

If the pricing model type is "Standard", this can be used to override the price. Otherwise use quantityRanges

pricingModelType

Enum: {Standard, Tiered, Stairstep, Volume}

Dictates how the price is calculated using the quantity. This is for the subscription product that is based on this plan product on this plan frequency.

quantityRanges

List of Objects. Defined below.

A collection of ranges that control the price of the subscription product based on its quantity field.

subscriptionProductDiscounts

List of Objects. Defined below.

A list of discounts that can directly be applied to the subscription product

Quantity Ranges Fields

Property
Type
Description

min

Decimal

The lower bound of the range

max

Decimal

The upper bound of the range. Null is interpreted as infinity

price

Decimal

The price for this range

Subscription Product Discount

Property
Type
Description

discountType

Enum:{ Percentage,
Amount, AmountPerUnit}

This field indicates the type of discount applied.

amount

Decimal

For Percentage discounts, this is the percentage which is discounted from the charge (if the discount is 25%, this value will be 25). For Amount discounts this is the actual value to subtract from the charge.

remainingUsagesUntilStart

Integer

This is the number of billing cycles which must pass before the discount is applied.

remainingUsage

Integer

This is the number of billing cycles which must pass before the discount automatically expires and is removed. This will be NULL for discounts which are perpetual.

Examples
curl -X POST "https://secure.fusebill.com/v1/subscriptions" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"  \
  -d "{customerID:'310045',planFrequencyID: '19384'}"
//Json Payload
string jsonData = "{customerID:'310045',planFrequencyID: '19384'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/subscriptions");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = "{customerID:'310045',planFrequencyID: '19384'}"
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/subscriptions', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "CustomerID": 310045,
  "planFrequencyID": '19384'
}
{
   "planFrequencyId":456,
   "customerId":789,
   "subscriptionOverride":{
   	"Name":"newName",
   	"Description":"newDescription"
   },
   "reference":"custom Value",
   "scheduledActivationTimestamp":"2021-02-09",
   "remainingInterval":9,
   "remainingIntervalPushOut":2,
   "contractStartTimestamp":"2018-01-05T10:10:10",
   "contractEndTimestamp":"2028-01-05T10:10:10",
   "invoiceDay":7,
   "invoiceMonth":3,
   "couponCodes":[
   	"coupon_12",
   	"coupon_43"
   	]
}
{
  "customerId": 310045,
  "planFrequencyId": 19384,
  "subscriptionOverride": {
    "name": "override default name",
    "description": "override default description"
  },
  "scheduledActivationTimestamp": "2019-10-20",
  "reference": "sample reference string",

  "contractStartTimestamp": "2018-03-01",
  "contractEndTimestamp": "2018-03-01",
}
https://secure.fusebill.com/subscriptions?preview=true&view=sideeffects
{
    "taxationAddress": {
        "line1": "117 Waba Road",
        "line2": "UNIT 300",
        "countryId": 124,
        "stateId": 9,
        "city": "Pakenham",
        "postalZip": "K0A2X0"
    },
    "planFrequencyId": 22104
}
Response
{
    "customerId": 1930362,
    "planFrequency": {
        "planRevisionId": 3135696,
        "numberOfIntervals": 1,
        "interval": "Monthly",
        "numberOfSubscriptions": 1,
        "status": "Active",
        "setupFees": [
        ],
        "charges": [
        ],
        "isProrated": false,
        "prorationGranularity": null,
        "planFrequencyUniqueId": 1283935,
        "remainingInterval": null,
        "id": 1868701,
        "uri": null
    },
    "planCode": "premiumplan",
    "planName": "Premium Plan",
    "planDescription": null,
    "planReference": null,
    "status": "Active",
    "reference": null,
    "subscriptionOverride": null,
    "hasPostedInvoice": true,
    "createdTimestamp": "2017-05-12T21:36:31.0000794Z",
    "activatedTimestamp": "2017-05-12T21:36:31.0000794Z",
    "provisionedTimestamp": null,
    "nextPeriodStartDate": "2017-06-12T04:00:00",
    "scheduledActivationTimestamp": null,
    "subscriptionProducts": [
        {
            "subscriptionId": 3135696,
            "planProduct": {
                "status": "Active",
                "productId": 1421752,
                "planId": 828556,
                "productCode": "premiumproduct",
                "productName": "Premium Product",
                "productStatus": "Active",
                "productDescription": null,
                "productType": "RecurringService",
                "productGLCode": "",
                "quantity": 1,
                "maxQuantity": null,
                "isRecurring": true,
                "isFixed": false,
                "isOptional": true,
                "isIncludedByDefault": true,
                "isTrackingItems": false,
                "chargeAtSubscriptionActivation": true,
                "orderToCashCycles": [
                    {
                        "planFrequencyId": 1868701,
                        "planProductId": 1719495,
                        "numberOfIntervals": 1,
                        "interval": "Monthly",
                        "chargeModels": [
                            {
                                "chargeModelType": "Signup",
                                "chargeTimingType": "StartOfPeriod",
                                "prorationGranularity": "Daily",
                                "prorateOnPositiveQuantity": false,
                                "prorateOnNegativeQuantity": false,
                                "reverseChargeOnNegativeQuantity": false,
                                "id": 56403857,
                                "uri": null
                            },
                            {
                                "chargeModelType": "Lifetime",
                                "chargeTimingType": "Immediate",
                                "prorationGranularity": "Daily",
                                "prorateOnPositiveQuantity": false,
                                "prorateOnNegativeQuantity": false,
                                "reverseChargeOnNegativeQuantity": false,
                                "id": 56403857,
                                "uri": null
                            }
                        ],
                        "remainingInterval": null,
                        "groupQuantityChangeCharges": false,
                        "planProductPriceUplifts": null,
                        "customServiceDateNumberOfIntervals": 0,
                        "customServiceDateInterval": "Periods",
                        "customServiceDateProjection": "Future",
                        "earningInterval": "Monthly",
                        "earningNumberOfIntervals": 1,
                        "earningTimingInterval": "Daily",
                        "earningTimingType": "StartOfInterval",
                        "pricingModel": {
                            "pricingModelType": "Standard",
                            "quantityRanges": [
                                {
                                    "min": 0,
                                    "max": null,
                                    "prices": [
                                        {
                                            "amount": 39.99,
                                            "currency": "USD",
                                            "id": 56403857,
                                            "uri": null
                                        }
                                    ],
                                    "id": 0,
                                    "uri": null
                                }
                            ],
                            "id": 56403857,
                            "uri": null
                        },
                        "id": 56403857,
                        "uri": null
                    }
                ],
                "resetType": "Never",
                "planProductUniqueId": 1509277,
                "generateZeroDollarCharge": false,
                "id": 1719495,
                "uri": ""
            },
            "quantity": 1,
            "isIncluded": true,
            "startDate": null,
            "subscriptionProductOverride": null,
            "subscriptionProductPriceOverride": null,
            "chargeAtSubscriptionActivation": true,
            "isCharged": true,
            "subscriptionProductDiscount": null,
            "subscriptionProductDiscounts": [
            ],
            "customFields": null,
            "monthlyRecurringRevenue": 39.99,
            "netMonthlyRecurringRevenue": 39.99,
            "amount": 39.99,
            "status": "Active",
            "lastPurchaseDate": "2017-05-12T21:36:31.0000794Z",
            "earningSettings": {
                "earningTimingInterval": "Daily",
                "earningTimingType": "StartOfInterval"
            },
            "remainingInterval": null,
            "groupQuantityChangeCharges": false,
            "priceUpliftsEnabled": false,
            "priceUplifts": [
            ],
            "historicalPriceUplifts": [
            ],
            "customServiceDateNumberOfIntervals": 0,
            "customServiceDateInterval": "Periods",
            "customServiceDateProjection": "Future",
            "generateZeroDollarCharge": false,
            "id": 56403857,
            "uri": "https://secure.fusebill.com/v1/SubscriptionProducts/56403857"
        }
    ],
    "remainingInterval": null,
    "remainingIntervalPushOut": null,
    "openSubscriptionPeriodEndDate": "2017-06-12T04:00:00",
    "chargeDiscount": null,
    "setupFeeDiscount": null,
    "chargeDiscounts": null,
    "setupFeeDiscounts": null,
    "customFields": null,
    "planAutoApplyChanges": false,
    "autoApplyCatalogChanges": false,
    "monthlyRecurringRevenue": 39.99,
    "netMonthlyRecurringRevenue": 39.99,
    "amount": 39.99,
    "contractStartTimestamp": null,
    "contractEndTimestamp": null,
    "expiredTimestamp": null,
    "coupons": [
    ],
    "subscriptionHasRecurringEndOfPeriodCharge": false,
    "id": 3135696,
    "uri": "https://secure.fusebill.com/v1/subscriptions/3135696"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Plan with id 123 not found."
        }
    ]
}
Suggest Edits

Update Subscription

This action allows you to edit a Subscription. Editing a Subscription will return the updated Subscription object so you can verify your changes.

 
puthttps://secure.fusebill.com/v1/subscriptions
 

Special Considerations

Request considerations: Due to the complex nature of the subscription DTO we recommend using a get/put methodology when modifying a subscription. If values are not included, they may get nullified.

Request limitations: Only the specific fields listed in the below Object tables can be edited via the PUT Subscription operation.

**To change quantity or to include or un-include a plan product the manipulation must occur here.

Change subscription name/description: To change the subscription name or description you must enter new values in the subscriptionOveride element

Editing reference: This can be done by simply submitting a value in the Reference field directly

Editing contract start and end dates: This can set by submitting UTC datetime values in the contract fields

Setting, modifying and removing the scheduled activation date: This can be set by submitting UTC date time value in the scheduledActivtionTimestamp field

Setting the expiry period: This can set by submitting a number for the remaining expiry periods in the remainingInterval field. Note that the value “0” will result in an initial charge and then immediate expiry of the subscription following activation.

Query considerations: If you wish to temporarily disable automatically sending invoice changes we have an appendable query that can temporarily turn off that feature. Here's an example of that

secure.fusebill.com/v1/subscriptions?temporarilyDisableAutoPost=true

A few more important notes:

One consideration we must note is that the charges will remain on a draft unsent invoice until that draft invoice is posted.

When modifying a subscription with discounts you are required to remove the subscriptionProductDiscount (legacy object) entity and leave subscriptionProductDiscounts in place in order to carry forward your discounts.

Setting the PriceUpliftsEnabled key-value to "False" from a previous value of "True" will delete existing, future and historical price uplifts.

Request Parameters

Property
Type
Description

subscriptionOverride

Object. Defined below

This is an object which can override certain fields from the plan

status

Enum: {Active, Draft, Cancelled, Provisioning, Expired, Migrated, Suspended}

This is the status of this subscription. Draft indicates that the Subscription has not yet been activated. Provisioning indicates this Subscription has been provisioned but that the Setup Fee and recurring Charge has not been applied to the Customer. To set a Subscription as "Provisioned" you must set a Scheduled Activation Date for some time in the future. "Migrated" if the Subscription was migrated to another.

reference

String

This is a text field you can populate with reference text for this subscription. This field is not exposed on the Invoice.
[Max Length: 255 characters]

subscriptionProducts

List of Objects. Defined below

This indicates if this Subscription has caused an invoice to be created and posted against the Customer's account.

scheduledActivationTimestamp

DateTime

If set, this indicates when the Subscription should activate. To set a Subscription as "Provisioned" you must set a Scheduled Activation Date for some time in the future. The Subscription will automatically set to an "Active" status on the Scheduled Activation Date.

remainingInterval

Integer

This lists the default number of intervals that remain before expiry. This is a default set at the plan level.

remainingIntervalPushOut

Integer

This is the setting to default what the new remaining interval when the subscription is up for renewal.

billingPeriodId

Integer

The Fusebill generated ID that uniquely identifies the billing period associated with this subscription

invoiceDay

Integer

The day of the month this subscription invoices on

invoiceMonth

Integer

The month of the year this subscription invoices on

contractStartTimestamp

Timestamp

This is the date that the contract period will begin.

contractEndTimestamp

Timestamp

This is the date that the contract period will end.

id

Integer

The Fusebill generated ID uniquely identifying this subscription

Subscription Override Properties

Property
Type
Description

Name

String

This is the value which will override the PlanName field value. This override value will appear on invoices and in other Customer facing locations. [Max Length: 100 characters]

Description

String

This is the value which will override the PlanDescription field value. This override value will appear on invoices and in other Customer facing locations. [Max Length: 500 characters]

Subscription Products

Property
Type
Description

quantity

Decimal

This is the quantity of this Subscription Product being purchased. Used by the pricing model and price ranges to calculate the overall price.

isIncluded

Boolean

Controls whether this subscription product is included if the plan product is optional.

startDate

Timestamp

Controls scheduling for when this product generates charges. Can only be changed before the subscription has charges

subscriptionProductOverride

Object. Defined below

Used to override name and description

subscriptionProductPriceOverride

Object. See Subsctiptions: Subscription Product Price Override for details

Used to override pricing details

chargeAtSubscriptionActivation

Boolean

Controls whether this subscription product will charge at activation. Can only be changed before the subscription has charges

subscriptionProductDiscount

Object

Deprecated. Use the list subscriptionProductDiscounts instead

subscriptionProductDiscounts

List of objects. Defined below.

A list of discounts applied to this subscription product

earningSettings

Object. Defined below

Controls how this subscription product earns

remainingInterval

Integer

The number of intervals until this subscription product expires

upliftPriorToRecharge

Boolean

Controls whether price uplifts occur just prior to recharge

includingInitialCharge

Boolean

Controls whether the initial charge counts when timing price uplifts

priceUpliftsEnabled

Boolean

Controls whether price uplifts are being used for this subscription product

priceUplifts

List of objects. Definition below.

A schedule of price uplifts

customServiceDateNumberOfIntervals

Integer

Service dates control the dates displayed on invoice below the line item representing this subscription product on this plan frequency. This indicates how many intervals away from the invoice date is to be displayed.

customServiceDateInterval

Enum: {Days,
Periods}

Service dates control the dates displayed on invoice below the line item representing this subscription product. This controls whether the distance from the invoice date is measured in days or periods.

customServiceDateProjection

Enum: {Past,
Future}

Service dates control the dates displayed on invoice below the line item representing this plan product on this plan frequency. This controls whether the service date is before the posted invoice, or after.

generateZeroDollarCharge

Boolean

Indicates whether this subscription product should generate a charge if it is zero dollars

id

Integer

The Fusebill generated ID that uniquely identifies this subscription product.

Subscription Product Override Fields

Property
Type
Description

name

String

This is the value which will be displayed instead of planProduct.productName on invoices and in other customer facing locations. [Max Length: 100 characters]

description

String

This is the value which will be displayed instead of planProuct.productDescription on invoices and in other customer facing locations. [Max Length: 500 characters]

Price Uplift Fields

Property
Type
Description

sequenceNumber

Integer

Indicates which position this uplift is in the sequence

remainingIntervals

Integer

The remaining number of intervals before this price uplift takes effect after the previous uplift in the sequence occurs

amount

Decimal

The percent amount this uplift will increase the price by

repeatForever

Boolean

If this uplift is the last in the sequence, this indicates whether this uplift will repeat every numberOfIntervals after its first occurrence

upliftPriorToRecharge

Boolean

Indicates whether the uplift occurs just prior to or just after the recharge

Subscription Product Discount

Property
Type
Description

discountType

Enum:{ Percentage,
Amount, AmountPerUnit}

This field indicates the type of discount applied.

amount