Support > Documentation > Plug-in Web Applications > E-commerce > Billing Adjustments

Billing Adjustments

A surcharge is an adjustment to the total of an invoice, whether positive (add-on cost) or negative (discount). Examples of surcharges include:
  • sales taxes
  • shipping & handling fees
  • sales/promotions
  • quantity discounts
  • conditional discounts (buy X, get a discount on Y)

Surcharge Configuration

  • Surcharge
    The surcharge name is how it will appear on the invoice.

  • Status
    Set the status to "inactive" to archive it or otherwise prevent it from being applied to invoices.

  • Coupon Code
    If you define a coupon code, the buyer will only receive the benefit of the surcharge if they type in a matching code at the time they check out.

  • Minimum Quantity
    The surcharge will only apply to an item if the quantity purchased is at least this number.

  • Treat as
    The surcharge appears as its own line item on the invoice. This line item can be categorized for financial reports using this option. Discounts to certain purchase categories should be categorized the same as the original purchase category, to allow the correct recalculation of sales taxes.

  • Website
    The surcharge will only be applied to purchases originating from this website. If no website is set, it will apply to all websites on this system.

Cost Adjustments

The cost fields are used to calculate the actual amount of the surcharge.

A percent value is multiplied by the line-item subtotal. For exmaple, if a line item has a subtotal of $20.00, and a 5% tax surcharge applies to that item, then a surcharge of 20.00 * 0.05 = $1.00 will be added to the invoice.

A per item value is a dollar amount that is multiplied by the line-item quantity. For example, if a product has a shipping charge of $2 per item, and 5 items are purchased, a surcharge of 5 * 2.00 = $10.00 will be added to the invoice.

A per unit size value is a dollar amount that is multiplied by the line-item size (which might be a weight, length, or other quantity that indicates the size of the item). For example, if a user buys 4 of an item that weighs 1.5 kgs each, and the shipping cost is $5 per kg, a surcharge of 4 * 1.5 * 5.00 = $30.00 will be added to the invoice.

A per product value is a dollar amount that is only applied once for a given product (technically, once per line item), no matter what quantity is purchased.

A per order value is a dollar amount that is only applied once for a given invoice, no matter how many items on that order qualify for the surcharge.

You can specify more than one of these, and the costs will be added together to get the surcharge subtotal.

Discounts

When configuring discounts, enter negative values in the cost adjustment fields. For example:
  • "-50" in the percent fields means "50% off"
  • "-50" in the "per item" field means a $50 off on each item purchased
  •  "-50" in the "per order" field means $50 off the invoice total

Surcharge regions

Surcharges can be region-specific. This is commonly used for handling different sales tax jurisdictions, and for calculating shipping charges based on region being shipped to. The region is compared to the region of the buyer (as entered on the checkout screen).

Specify states and provinces using their standard 2-letter codes. You can combine multiple province/states into one region by separating them with a bar character, like this:

BC|AB|SK

Countries can be specified and combined the same way. For example, to apply a surcharge to North American buyers, you can set the country to:

Canada|Mexico|United States

To specify an everywhere-except condition, put an exclamation point in front of the state/province or country. For example, to add a surchage for everywhere outside of Canada or the USA, use:

!Canada|United States

Surcharge dates

Surcharges can be set up to be valid only during certain dates and times. Set the start and end dates and times using the date selectors. If the start time is unset, then the surcharge is valid at any time up to the end time. If the end date is unset, then it is valid at any time after the start time. If both are unset, then it is always valid.

Surcharge conditions

Surcharges can be configured to apply TO certain items only, and also to apply only IF certain other items exist on the invoice.
  • Apply to
    The surcharge only applies to line items of this account code. If the surcharge applies to multiple account codes, a different surcharge should be set up for each.

  • Apply to object type, ID
    If the surcharge only applies to a very specific line item, the type and ID of that line item can be specified here. This is used for tying discounts or special surcharges to specific products, for instance.

  • Apply if they bought
    The surcharge only applies if the buyer also bought something of this account code.

  • Apply if they bought object type, ID
    The surcharge only applies if the buyer also bought a specific item, as given by the type and ID.

Surcharge Examples

Sales Tax

Set Treat as = TAX. Set the tax rate in the Percent field. Set the tax region (the area where this sales tax applies) in the Province/State and Country fields. Set the taxable purchase category in the Apply to field.

Multiple sales tax surcharges will have to be set up to cover the different Apply-to purchase categories that are taxable, as well as the different tax jurisdictions and rates in each of those jurisdictions.

Sales Tax Example

This configures the harmonized sales tax (HST) on all merchandise purchase made by buyers in ON, NS, NB, and NL:

Surcharge HST 
Treat as  Tax 
Percent  13.0 
Province/State  ON|NS|NB|NL 
Country  Canada
Apply to  Merchandise 

Shipping & Handling

There are many different ways to use the surcharge system to automatically compute shipping costs. Here are some examples:

Fixed rate per item

For example, charge $1 per book when ordering books from an online bookstore:

Surcharge Shipping & handling 
Treat as  Shipping 
Per item  1.00 
Apply to  Merchandise 

Charge by size

For example, charge $5 per kg:

Surcharge Shipping & handling 
Treat as  Shipping 
Per unit size  5.00 
Apply to  Merchandise 

You must ensure that every shippable item has an accurate size associated with it, and that the sizes are in consistent units (eg. kg for this example).

Charge by size with minimum charge

For example, charge $5 plus $2 per kg

Surcharge Shipping & handling 
Treat as  Shipping 
Per order  5.00
Per unit size  2.00 
Apply to  Merchandise 

Charge by distance

For example, charge $5 per kg to Canada, $10 per kg to USA, and $15 per kg worldwide:

Surcharge Shipping & handling 
Treat as  Shipping 
Per unit size  5.00 
Apply to  Merchandise 
Country  Canada 

Surcharge Shipping & handling 
Treat as  Shipping 
Per unit size  10.00 
Apply to  Merchandise 
Country  United States 

Surcharge Shipping & handling 
Treat as  Shipping 
Per unit size  15.00 
Apply to  Merchandise 
Country  !Canada|United States

Discounts and Sales

Special Sale

One-day sale on all merchandise - 15% off everything in store:

Surcharge Sale discount 
Treat as  Merchandise 
Percent  -15.0 
Apply to  Merchandise 
Valid From  2011-07-01 00:00:00 
Valid To  2011-07-02 00:00:00 

Note that we treat the sale discount as a (negative) merchandise sale. This is to ensure that other surcharges such as taxes are correctly recalculated. For example, if an item costs $50, and there is 10% tax, the invoice will initially total 50.00 + 5.00 = $55.00. With this sale, we add an extra line item to the invoice called "Sale discount" worth -7.50 off the price of the original item. We then calculate sales tax on this new line item, resulting in another surcharge of -7.50 * 10% = -0.75, which is basically the correction to the original $5.00 sales tax.

Clearance Item

A particular product is discontinued, and the remaining stock is 50% off:

Surcharge Clearance discount 
Treat as  Merchandise 
Percent  -50.0 
Apply to object type  catalog_product 
Apply to object ID  <product ID> 

The object type is set to catalog_product (this is the internal name of the database table that describes the products). The object ID is the product ID in this table.

Quantity Discount

The regular price is for up to 10 items. Over 10 items, the buyer gets $1 off each item. Over 100 items, the buyer gets $2 off each item.

Surcharge Quantity discount 
Treat as  Merchandise 
Per item  -1.00 
Minimum quantity  11 
Apply to object type  catalog_product 
Apply to object ID  <product ID>

Surcharge Quantity discount 
Treat as  Merchandise 
Per item  -1.00 
Minimum quantity  101 
Apply to object type  catalog_product 
Apply to object ID  <product ID>

Note that the second discount is also for $1, even though the over-100 discount is $2. This is because the buyer will get both discounts if they buy more than 100 items.

Conditional Discount

The buyer gets $50 off a conference registration if they also sign up as a member of the organization at the same time:

Surcharge New membership discount 
Treat as  Membership Dues
Per item  -50.00
Apply to  Event Registration 
Apply if  Membership Dues 

Here, the Apply if = "Membership Dues" condition means that this surcharge will be used only if the invoice includes a line item for membership dues. The surcharge gets applied to any other line item that is an event registration.

Promo Code Discount

The buyer gets $10 off a conference registration if they enter the promo code "FIREWORKS" at checkout:

Surcharge Promo-code discount 
Treat as  Event Registration 
Per item  -10.00 
Apply to  Event Registration 
Code  FIREWORKS 

Topics

google (5 items)
RSS (3 items)
SEO (3 items)
plug-in modules (28 items)
IT (9 items)
best practices (5 items)
visual tutorial (29 items)
security (3 items)
data handling (7 items)
fundamentals (3 items)
graphic design (19 items)
web protocols (9 items)
programming (48 items)
html formatting (7 items)
POD (32 items)
events (8 items)