Purchases in Fusebill are the result of purchasing a priced product outside a plan. Purchases exist separate to subscriptions and are managed on their own outside the context of the customer's subscriptions.
When a product is purchased it is added to the customer's draft purchases just like how a subscription, when created, first goes into a draft status. The purchase does not charge the customer until the purchase is finalized and moved from draft. Once finalized, the purchase is moved into the customer's purchase history.
Purchase Properties
Proptery | Type | Description |
---|---|---|
customerId | Integer | This is the unique ID of the Customer who made the Purchase. [Read Only] |
code | String | The product code. Fusebill enforces uniqueness for this value. [Max length: 1000 characters] |
effectiveTimestamp | Timestamp | The time the purchase occurred. [Read Only] |
taxableAmount | Decimal | The amount of the purchase eligible for taxation |
amount | Decimal | The amount for the purchase |
modifiedTimestamp | Timestamp | The time of the most recent modification to this purchase |
salesforceId | String | The Salesforce ID of the purchase in Salesforce that this purchase maps to. |
netsuiteLocationId | String | The NetSuite location ID for this purchase. |
productId | Integer | This is the Fusebill generated unique ID of the product sold in this purchase. [Read Only] |
name | String | This is the name of the purchase. This is customer facing and appears on Invoices. [Max Length: 250 characters] |
description | String | This is the description of the purchase. This is customer facing and appears on Invoices.[Max Length: 250 characters] |
isTrackingItems | Boolean | This field defines if the purchase uses the tracked items feature. |
status | Enum: {Draft, Purchased, Reversed, Cancelled} | This is the status of the purchase. |
quantity | Decimal | This is the quantity (number of units) sold in this purchase. |
targetOrderQuantity | Decimal | This is the target order quantity. If the target order quantity is not reached, the purchase cannot be finalized. Relevant only for tracked item purchases. |
pricingModelType | Enum: {Standard, Stairstep, Volume, or Tiered} | Dictates how the price is calculated using the quantity. |
customFields | List of objects. See Catalog: Custom Fields for details | This is a list of the custom fields attached to this purchase. |
discounts | list of objects. See Purchase Discount Object for details | This is a list of discounts applied to this purchase. This includes discounts added directly as well as those applied as a result of applying a coupon to this purchase. |
priceRanges | List of objects. Defined below. | This is a list of the prices and quantity ranges for this Purchase. This contains a range and associated price for each tier, volume, or stairstep level in the purchase price model. Standard pricing has only one quantity range. |
productItems | List of objects. See Tracking: Tracked Items Object for details | This is a list of the Purchase Product Items (tracked items) associated to this purchase. |
couponCodes | List of Strings | This is a list of the coupons codes, as strings, applied to the purchase. |
earningSettings | Object. Defined below | Controls how this purchase earns |
id | Integer | The Fusebill generated ID for this purchase. [Read Only] |
uri | String | The full string path to this resource [Read Only] |
Price Range Properties
Property | Type | Description |
---|---|---|
min | Decimal | The lower bound for this range. |
max | Decimal | The upper bound for this range. Null is interpreted as infinity |
amount | Decimal | The price for this range |
Earning Settings Object
Property | Type | Description |
---|---|---|
earningInterval | Enum: {Monthly, Yearly} | Indicates whether the custom earning period (if a custom earning period is being used) is measured in years or months |
earningNumberOfIntervals | Integer | The number of earningInterval s that constitute the period this purchase earns over |
earningTimingInterval | Enum:{Daily, Monthly, Yearly, Interval, DoesNotEarn, EarnImmediately} | Indicates how to divide the custom period if a custom period is being used, indicates the purchase does not earn, or indicates that the purchase earns immediately |
earningTimingType | Enum:{StartOfInterval, EndOfInterval, DoesNotEarn} | Indicates where in the interval the earning occurs, if custom earning periods are being used |