My favorites | English | Sign in

Google Checkout

Google Checkout HTML API - Defining Tax Rules

Note: This is the latest documentation. The previous version of this page is identical — only the left nav differs.
Specifying Tax Rules
Ordering Tax Rules in HTML Requests
Country-Specific Rounding Rules
HTML Examples for Tax Tables
HTML Parameter Definitions

Specifying Tax Rules

Google Checkout calculates taxes based on tax rules that you include in your Checkout API request. Every tax rule must specify the geographic area(s) where the rule applies as well as the tax rate that should be charged in that area. You can specify tax rates that are different for each item in an order, and you can apply those tax rates in areas as small as a postal or zip code or as large as the world.

Checkout API requests can specify two different types of tax rules.

  • Default tax rules identify tax rates that will be applied, by default, in a particular geographic area. Default tax rules may also contain an optional element that indicates whether tax rates apply to shipping costs. Default tax rules are grouped into a default tax table, and each Checkout API request may contain one default tax table. You can override your default tax rules by specifying an alternate tax rule that should be used to calculate tax for an item.

  • Alternate tax rules identify tax rates that can be applied to particular types of products. For example, in some states, manufactured goods may be taxed at one rate but extended warranties on those goods may be taxed at a different rate. In your Checkout API request, alternate tax rules are grouped into alternate tax tables. Each alternate tax table contains all of the alternate tax rules for a particular type of product or service, and a Checkout API request may contain zero or more alternate tax tables.

    Like default tax rules, alternate tax rules specify particular geographic areas where each rule applies. (Each geographic area identified in an alternate tax rule can specify its own alternate tax rate.) However, an alternate tax rule will only be used to calculate tax for an item if the Checkout API request specifies a tax-table-selector value for that item. In that case, Google Checkout will try to match the value of the tax-table-selector element to the names of the alternate tax tables in your shopping cart.

    For example, the following HTML excerpt from a Checkout API request shows an item that specifies an alternate tax table that should be used to calculate taxes for the item.

    <input type="hidden" name="item_name_2"
      value="Three-year extended warranty for 512MB PC2-5300 DDR SO-DIMM"/>
    
    <input type="hidden" name="item_description_2"
      value="Extended warranty for PC2-5300"/>
    
    <input type="hidden" name="item_quantity_2" value="1"/>
    
    <input type="hidden" name="item_price_2" value="29.99"/>
    
    <input type="hidden" name="item_currency_2" value="USD"/>
    
    <input type="hidden" name="shopping-cart.items.item-2.tax-table-selector"
      value="warranty"/>
    

    To calculate taxes for this item, Google Checkout would use the alternate tax table in your Checkout API request that had a name of "warranty":

    <input type="hidden"
      name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.name"
      value="warranty"/>
    

    In some cases, an item might specify an alternate tax table, but that table will not contain an alternate tax rule for the location to which the item is being shipped. In these cases, Google Checkout will refer to the standalone parameter value for that tax table to determine how to calculate taxes. If the standalone parameter value is true, Google Checkout will not calculate tax for the item. (The tax amount for that item will be 0.) If the standalone parameter value is false, Google Checkout will use the default tax table to calculate taxes for the item. The default value of the standalone parameter is false.

Ordering Tax Rules in HTML Requests

To select the tax rate for an item, Google Checkout selects the first default tax rule in the API request for which the tax area matches the shipping address. (If you specify a tax-table-selector for the item, Google Checkout will select the first alternate tax rule for which the tax area matches the shipping address.)

As such, your tax tables should order tax rules that apply in more specific geographic areas before rules that apply in less specific areas. For example, if a state has a 4 percent sales tax rate and a zip code in that state has an 8 percent sales tax rate, you should order the tax rule for the zip code before the tax rule for the state.

The following HTML excerpt demonstrates this principle. The excerpt is from an order being shipped to the 10022 zip code, which is in New York City. The sales tax rate in New York City is 8.375 percent whereas the New York state sales tax is 4 percent. Note that the tax rule for New York City zip codes is listed before the tax rule for the state of New York. In this example, both tax rules match a shipping address in the 10022 zip code, but Google Checkout will select the first matching tax rate, which is the rule with a zip code pattern of "100*" and a rate of 8.375% (0.08375).

Note: Google Checkout determines the order for tax rules (or alternate tax rules) based on the numeric identifier attached to the "default-tax-rule" or "alternate-tax-rule" portion of the input parameter name. In the example below, parameter names for the tax rule associated with the zip codes contain the string default-tax-rule-1, and parameter names for the tax rule associated with the state of New York contain the string default-tax-rule-2.

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="false"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.08375"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-zip-area-1.zip-pattern"
  value="100*"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.rate"
  value="0.0400"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.tax-areas.us-state-area-1.state"
  value="NY"/>

Note: This excerpt does not include all zip codes for New York City or all applicable tax rates for shipping addresses in New York.

Country-Specific Rounding Rules

For all financial calculations, Google Checkout uses a default rounding policy that is selected based on the merchant's home country. You can change the default rounding policy by adding the mode and rule parameters to your Checkout API request. The Google Checkout Rounding Policy document explains how to change the rounding policy used to calculate totals for an order.

  • For U.S. merchants, Google Checkout uses banker's rounding as its default policy. Banker's rounding is the same as the traditional method of rounding numbers with one exception. In banker's rounding, if the number to be rounded is followed by a five and no additional nonzero digits, the number is rounded to the nearest even number. The following examples demonstrate the expected behavior in banker's rounding:

    • 12.435 would be rounded up to 12.44. The number to be rounded (3) is rounded to the nearest even digit (4).
    • 12.445 would be rounded down to 12.44. The number to be rounded (4) is not rounded because it is an even digit.
    • 12.44501 would be rounded up to 12.45. The number to be rounded (4) is followed by a five and by additional nonzero digits.

    For U.S. merchants, Google calculates the total amount of tax for all of the items in an order and then uses banker's rounding to round that amount to two decimal places.

  • For U.K. merchants, Google Checkout uses the HALF_UP rounding mode. For this rounding mode, if the number being rounded is followed by a five and no additional nonzero digits, then that number is rounded up. All other numbers are rounded to the nearest digit. The following examples demonstrate the expected behavior for HALF_UP rounding:

    • 12.434 would be rounded down to 12.43.
    • 12.435 would be rounded up to 12.44.
    • 12.445 would be rounded up to 12.45.
    • 12.456 would be rounded up to 12.46.

    For U.K. merchants, Google calculates tax for each item in the order and then uses HALF_UP rounding for each calculated amount.

HTML Examples for Tax Tables

This section contains a number of HTML examples that demonstrate different ways of defining default tax tables and alternate tax tables. You can click the Checkout button below each example to see how the tax tables affect the buyer experience. The examples are for a fictional merchant and link to the Sandbox testing environment.

Adding the following shipping addresses to your Sandbox account will help you to test the buyer experience for the examples:

  • Name: John Maryland; Address: 15 Maryland Way, Bethesda MD 20810
  • Name: Jim Connecticut; Address 15 Whaler Court, Hartford CT 06126
  • Name: Dave New York City; Address: 15 York St., New York NY 10022
  • Name: Sally Upstate-NY; Address: 15 Saranac Ave., Saranac NY 12981
  • Name: Geoffrey England; Address: 15 London Rd., London SW1W 9QT

Please note that the following examples do not contain complete Checkout API requests:

Example 1: Charging a single tax rate in one state
 
Example 2: Charging tax in two non-overlapping geographic areas
 
Example 3: Charging tax in two overlapping geographic areas
 
Example 4: Alternate tax rules
 
Example 5: Alternate tax rules for items that are always tax-exempt
 
Example 6: Applying a tax rule in multiple geographic areas
 
Example 7: Alternate tax tables for U.K. merchants
 

Example 1: Charging a single tax rate in one state

The following example explains how to charge a single tax rate in one state. The example is for a merchant in Connecticut, where there is a 6 percent sales tax. The example contains a single tax rule. In addition, since shipping charges in Connecticut are taxed, the shipping-taxed parameter is included in this request with a value of true. (If shipping charges are not subject to tax in a state where you charge tax, you can omit the shipping-taxed parameter from the tax rule for that state or set the parameter's value to false.)

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.0600"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-state-area-1.state"
  value="CT"/>

Example 2: Charging tax in two non-overlapping geographic areas

The following example demonstrates how to create tax tables if you charge tax in more than one geographic area. In this example, the two areas are Connecticut and Maryland. Since the areas do not overlap – a shipping address can only be associated with one state – the tax rules can be specified in any order. As in the previous example, shipping charges in Connecticut are taxed; however, shipping charges in Maryland are not subject to tax.

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.0600"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-state-area-1.state"
  value="CT"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.shipping-taxed"
  value="false"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.rate"
  value="0.0500"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.tax-areas.us-state-area-2.state"
  value="MD"/>

Example 3: Charging tax in two overlapping geographic areas

The following example also demonstrates how to specify tax tables if you charge tax in more than one geographic area. However, in this example, the two areas are in the same state.

  • The first area defines a set of zip codes in Manhattan, where there is an 8.375 percent sales tax.
  • The second area defines a rule for charging 4 percent sales tax in the state of New York.

Since Google will select the first tax rule that matches the shipping address for the order, the tax rule that defines the narrower geographic area must be ordered first. (See the Ordering Tax Rules in HTML Requests section for more information.)

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.08375"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-zip-area-1.zip-pattern"
  value="100*"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.rate"
  value="0.0400"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.tax-areas.us-state-area-1.state"
  value="NY"/>

Example 4: Alternate tax rules

This example shows how to specify an alternate tax table for an item that is tax-exempt. The tax tables in this example indicate that the merchant charges sales tax in Connecticut and Maryland. In Connecticut, sales of bicycle helmets are tax-exempt. (Google does not return any search results indicating that bicycle helmet sales are also tax-exempt in Maryland.)

In this example, the HTML contains an alternate tax table for bicycle helmets. That tax table contains one alternate tax rule, which indicates that Connecticut does not charge tax for items associated with that tax table. Please note that value of the standalone parameter is set to false, which is that element's default value. As a result, if an item specifies the "bicycle helmets" tax table, and there is no alternate tax rule for the shipping address, Google will use the default tax table to calculate tax for the item. Therefore, if the item is shipped to Connecticut, no tax will be charged. However, if the item is shipped to Maryland, the regular tax rate will be assessed.

<input type="hidden" name="item_name_1" value="Bike Helmet"/>

<input type="hidden" name="item_description_1"
  value="Black helmet that is tax-exempt in CT but not MD."/>

<input type="hidden" name="item_quantity_1" value="1"/>

<input type="hidden" name="item_price_1" value="49.99"/>

<input type="hidden" name="item_currency_1" value="USD"/>

<input type="hidden" name="shopping-cart.items.item-1.tax-table-selector"
  value="bicycle_helmets"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.0600"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-state-area-1.state"
  value="CT"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.shipping-taxed"
  value="false"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.rate"
  value="0.0500"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.tax-areas.us-state-area-2.state"
  value="MD"/>


<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.name"
  value="bicycle_helmets"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.standalone"
  value="false"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.rate"
  value="0.00"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.tax-areas.us-state-area-1.state"
  value="CT"/>

Example 5: Alternate tax rules for items that are always tax-exempt

This example shows how to identify an item that is always tax-exempt, regardless of the shipping address. The tax tables indicate that the merchant charges sales tax in Connecticut and Maryland, and sales of nonprescription drugs are tax-exempt in both states. In this example, the HTML contains an alternate tax table for tax-exempt goods, and that tax table does not specify any alternate tax rules. However, since the value of the standalone parameter is set to true, Google will not calculate taxes for an item if it specifies the tax-exempt tax table and there is no alternate tax rule for the shipping address. Since the item in the example is always tax-exempt for this merchant, the tax table does not need to specify any tax rules.

<input type="hidden" name="item_name_1" value="Tylenol Caplets"/>

<input type="hidden" name="item_description_1"
  value="Fast relief without a prescription."/>

<input type="hidden" name="item_quantity_1" value="1"/>

<input type="hidden" name="item_price_1" value="79.99"/>

<input type="hidden" name="item_currency_1" value="USD"/>

<input type="hidden" name="shopping-cart.items.item-1.tax-table-selector"
  value="tax_exempt"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.0600"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.us-state-area-1.state"
  value="CT"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.shipping-taxed"
  value="false"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.rate"
  value="0.0500"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-2.tax-areas.us-state-area-2.state"
  value="MD"/>


<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.name"
  value="tax_exempt"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.standalone"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.rate"
  value="0.00"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.tax-areas.world-area-1"
  value=""/>

Example 6: Applying a tax rule in multiple geographic areas

This example demonstrates how to apply a tax rule in multiple geographic areas. This example applies the same tax rule in multiple European countries. The same principle could be used to apply a tax rule in multiple U.S. states or zip code ranges.

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.175"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.postal-area-1.country-code"
  value="DE"/>
<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.postal-area-2.country-code"
  value="ES"/>
<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.postal-area-3.country-code"
  value="GB"/>

Example 7: Alternate tax tables for U.K. merchants

This example shows a common way to structure tax tables in the United Kingdom. The order includes three items. The first item uses the default tax rate of 17.5 percent, the second item uses a reduced tax rate of 5 percent, and the third item is untaxed. Note that the cost of each item is £10.00. When you click the Checkout button for this order, Google Checkout displays the price for each item inclusive of tax.

<input type="hidden" name="item_name_1" value="Regular Test Item"/>

<input type="hidden" name="item_description_1"
  value="This item is taxed at the standard rate."/>

<input type="hidden" name="item_quantity_1" value="1"/>

<input type="hidden" name="item_price_1" value="10.00"/>

<input type="hidden" name="item_currency_1" value="GBP"/>

<input type="hidden" name="item_name_2" value="Reduced Tax Test Item"/>

<input type="hidden" name="item_description_2"
  value="This item is taxed at a reduced rate."/>

<input type="hidden" name="item_quantity_2" value="1"/>

<input type="hidden" name="item_price_2" value="10.00"/>

<input type="hidden" name="item_currency_2" value="GBP"/>

<input type="hidden" name="shopping-cart.items.item-2.tax-table-selector"
  value="reduced"/>

<input type="hidden" name="item_name_3" value="Zero Tax Test Item"/>

<input type="hidden" name="item_description_3"
  value="This item is tax exempt."/>

<input type="hidden" name="item_quantity_3" value="1"/>

<input type="hidden" name="item_price_3" value="10.00"/>

<input type="hidden" name="item_currency_3" value="GBP"/>

<input type="hidden" name="shopping-cart.items.item-3.tax-table-selector"
  value="tax_exempt"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.shipping-taxed"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate"
  value="0.175"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-areas.world-area-1"
  value=""/>



<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.name"
  value="reduced"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.standalone"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.rate"
  value="0.5"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-1.alternate-tax-rules.alternate-tax-rule-1.tax-areas.world-area-1"
  value=""/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-2.name"
  value="tax_exempt"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-2.standalone"
  value="true"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-2.alternate-tax-rules.alternate-tax-rule-1.rate"
  value="0.00"/>

<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-2.alternate-tax-rules.alternate-tax-rule-1.tax-areas.world-area-1"
  value=""/>

HTML Parameter Definitions

country-area
The country-area parameter identifies a region of the United States. Valid values for this parameter are:
CONTINENTAL_48 - All U.S. states except Alaska and Hawaii
FULL_50_STATES - All U.S. states
ALL - All U.S. postal service addresses, including military addresses, U.S. insular areas, etc.

Associated recurring elements


When the country-area parameter is associated with a shipping method, the us-country-area and flat-rate-shipping elements need to be numbered. When the country-area parameter is associated with a default tax table, the default-tax-rule and us-country-area elements must both be numbered. When the country-area parameter is associated with an alternate tax table, the alternate-tax-table, alternate-tax-rule and us-country-area elements must all be numbered.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-#.shipping-restrictions.[allowed-areas | excluded-areas].us-country-area-#.country-area" value="CONTINENTAL_48"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.tax-areas.us-country-area-#.country-area" value="CONTINENTAL_48"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.tax-areas.us-country-area-#.country-area" value="CONTINENTAL_48"/>


country-code

As a subtag of postal-area, the country-code parameter specifies a country associated with a tax areashipping restriction or address filter. In all other contexts, the country-code parameter identifies the country code associated with an order's billing address or shipping address. The value of this parameter must be a two-letter ISO 3166 country code.

Associated recurring elements


When the country-code parameter appears in a carrier-calculated shipping option in a Checkout API request, the shipping-package element must be numbered. In addition, the carrier-calculated-shipping element must be numbered with a value of 1.

API commands


Content format for parameter value


String

Sample use(s)


In a carrier-calculated-shipping option in a Checkout API request:
<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-#.ship-from.country-code" value="US"/>

In a new order notification:
[buyer-billing-address | buyer-shipping-address].country-code=US

In a risk information notification:
billing-address.country-code=US


mode

The mode parameter specifies the method that will be used to round monetary values to two decimal places. This parameter may contain any of the following values, each of which is defined in the Java 1.5 specification for the RoundingMode enumeration.RoundingMode enumeration.

  • UP - This mode rounds numbers away from zero. For example, the number 1.111 would be rounded to 1.12.

  • DOWN - This mode rounds numbers toward zero. For example, the number 1.666 would be rounded to 1.66.

  • CEILING - This mode rounds numbers toward positive infinity. For positive numbers, the CEILING mode functions identically to the UP rounding mode. For negative numbers, the CEILING mode functions identically to the DOWN rounding mode.

  • HALF_UP - This mode rounds numbers to the nearest digit. However, if the number being rounded is followed by a five and no additional nonzero digits, then then that number will be rounded up. For example, the number 1.165 would be rounded to 1.17. This method is the default rounding mode for U.K. merchants.

  • HALF_DOWN - This mode rounds numbers to the nearest digit. However, if the number being rounded is followed by a five and no additional nonzero digits, then then that number will be rounded down. For example, the number 1.165 would be rounded to 1.16.

  • HALF_EVEN - This mode, which is also known as banker's rounding, is the default rounding mode for U.S. merchants. Banker's rounding is the same as the traditional method of rounding numbers with one exception. In banker's rounding, if the number to be rounded is followed by a five and no additional nonzero digits, the number is rounded to the nearest even number.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.rounding-policy.mode" value="HALF_UP"/>

name

In a Checkout API request, the name parameter value contains a string that can be used to identify a tax table or shipping method. The parameter value must be at least one non-space character and may not be longer than 255 characters. The name parameter can also be used in a Checkout API request to identify the name of a query string parameter that will be included in a web beacon URL for third-party conversion tracking. The parameter's value is the name that the third-party tracking provider uses in its web beacon URLs.

In a new order notification, the name parameter specifies the name that Google uses to identify a promotion in the Merchant Center.

Associated recurring elements


When the name parameter specifies the name of a query string parameter that will be included in a web beacon URL for third-party conversion tracking, the parameterized-url element must be numbered to associate the URL with a particular web beacon. In addition, the url-parameter element must be numbered so that the parameter name may be associated with the parameter value, which is expressed using the type parameter. When the name parameter is associated with an alternate tax table, the alternate-tax-table element must be numbered. When the name parameter is associated with a shipping method in a Checkout API request, either the flat-rate-shipping or pickup element needs to be numbered. Finally, when the name parameter is associated with a promotion, the promotion element must be numbered so that the promotion name can be associated with a specific promotion.

Content format for parameter value


String

Sample use(s)


Identifying a shipping method in a Checkout API request:
input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.[flat-rate-shipping-# | pickup-shipping-#].name" value="Standard shipping"/

Identifying a tax table in a Checkout API request:
input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.name" value="reduced"/

Identifying a URL parameter in a Checkout API request:
input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.parameterized-urls.parameterized-url-#.parameters.url-parameter-#.name" value="taxes"/

Identifying a promotion in a new order notification:
promotions.promotion-#.name=Google+10+off+50


postal-code-pattern

The postal-code-pattern parameter contains a postal code or a range of postal codes for a specific country. To specify a range of postal codes, use an asterisk as a wildcard operator. For example, you can provide a postal-code-pattern value of SW* to indicate that a shipping option is available or a tax rule applies in any postal code beginning with the characters SW.

Associated recurring elements


When the postal-code-pattern parameter is associated with a shipping method, the postal-area and flat-rate-shipping elements need to be numbered. When the postal-code-pattern parameter is associated with a default tax table, the default-tax-rule and postal-area elements must both be numbered. When the postal-code-pattern parameter is associated with an alternate tax table, the alternate-tax-table, alternate-tax-rule and postal-area elements must all be numbered.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-#.shipping-restrictions.[allowed-areas | excluded-areas].postal-area.postal-code-pattern" value="SW*"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.tax-areas.postal-area-#.postal-code-pattern" value="SW*"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.tax-areas.postal-area-#.postal-code-pattern" value="SW*"/>


rate

The rate parameter identifies a tax rate that is expressed as a multiplier.

Associated recurring elements


When the rate parameter is associated with a default tax table, the default-tax-rule element must be numbered. When the rate parameter is associated with an alternate tax table, the alternate-tax-table and alternate-tax-rule elements must both be numbered.

API commands


Content format for parameter value


Double

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.rate" value="0.0825"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.rate" value="0.0825"/>


rule

The rule parameter indicates when the rounding rule will be applied. Valid values for this parameter are PER_LINE and TOTAL. For U.S. merchants, the default value for this parameter is TOTAL. For U.K. merchants, the default value for this parameter is PER_LINE. The following list explains the meaning of these two values:

  • PER_LINE - This rounding rule indicates that Google should calculate the tax for each line item and round each of those tax values using the specified rounding mode. After each tax value has been rounded, Google should then add the tax values to determine the total tax.

    Note: A line item is comprised of one or more units of the same item. For example, if a shopping cart contains two identical items that each cost $1.00 and the sales tax rate is 7.5 percent, then the total cost of the line item is $2.00 and the total tax for the line item is 15 cents.

  • TOTAL - This rounding rule indicates that Google should calculate the tax for each item and add those tax values to calculate the total unrounded tax amount for the order. Google should then apply the specified rounding mode to the total tax to determine the total tax for the order.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.rounding-policy.rule" value="PER_LINE"/>

shipping-taxed

The shipping-taxed parameter indicates whether shipping charges for an order are taxable.

Associated recurring elements


The default-tax-rule element must be numbered to identify the tax rule for which shipping is (or is not) taxed.

API commands


Content format for parameter value


Boolean

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.shipping-taxed" value="true"/>

standalone
The standalone parameter indicates how taxes should be calculated if there is no matching alternate-tax-rule for the given state, zip code or country area. If this parameter's value is TRUE and there is no matching alternate-tax-rule, the tax amount will be zero. If the parameter's value is FALSE and there is no matching alternate-tax-rule, the tax amount will be calculated using the default tax table.

Associated recurring elements


The alternate-tax-table element associates the standalone parameter value with a particular alternate tax table.

API commands


Content format for parameter value


Boolean

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables..alternate-tax-table-#.standalone" value="true"/>

state

The state parameter identifies a state where a particular tax rule is applied or where a particular shipping option is available or unavailable.

Associated recurring elements


When the state parameter is associated with a shipping method, the us-state-area and flat-rate-shipping elements need to be numbered. When the state parameter is associated with a default tax table, the default-tax-rule and us-state-area elements must both be numbered. When the state parameter is associated with an alternate tax table, the alternate-tax-table, alternate-tax-rule and us-state-area elements must all be numbered.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-#.shipping-restrictions.[allowed-areas | excluded-areas].us-state-area-#.state" value="CT"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.tax-areas.us-state-area-#.state" value="CT"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.tax-areas.us-state-area-#.state" value="CT"/>


tax-table-selector

The tax-table-selector parameter identifies an alternate tax table that should be used to calculate tax for a particular item. The value of the tax-table-selector parameter should correspond to the name of an alternate-tax-table.

Associated recurring elements


The item element, which must be numbered, associates this parameter with a specific item in an order.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="shopping-cart.items.item-#.tax-table-selector" value="food"/>

world-area

The world-area parameter represents the entire world. This parameter indicates that a shipping option is available worldwide or that a particular tax rule applies worldwide.

For shipping options, the world-area parameter can only appear as a subtag of the allowed-areas parameter. (Including the world-area parameter as a subtag of the excluded-areas parameter would make the corresponding shipping option unavailable to all shipping addresses.) However, you can use the world-area parameter to indicate that a shipping option is available worldwide and then identify specific excluded areas where the shipping option is unavailable. Those excluded areas could identify regions that are covered by other shipping options or regions where you do not ship items.

For tax rules, Google Checkout will select the first tax rule that matches the customer's shipping address. As such, if you use the world-area parameter to define the area where a tax rule applies, that tax rule must appear last in the list of tax rules in your API request. See the XML Examples for Tax Areas to see a feed excerpt that uses the world-area parameter for tax rules.

Associated recurring elements


When the world-area parameter is associated with a shipping method, the world-area and flat-rate-shipping elements need to be numbered. When the world-area parameter is associated with a default tax table, the default-tax-rule and world-area elements must both be numbered. When the world-area parameter is associated with an alternate tax table, the alternate-tax-table, alternate-tax-rule and world-area elements must all be numbered.

API commands


Content format for parameter value


Complex

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-#.shipping-restrictions.[allowed-areas | excluded-areas].world-area-#" value=""/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.tax-areas.world-area-#" value=""/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.tax-areas.world-area-#" value=""/>


zip-pattern

The zip-pattern parameter contains a zip code or a range of zip codes. To specify a range of zip codes, use an asterisk as a wildcard operator. For example, you can specify that a shipping option is available or a tax rule applies to zip codes 94040 through 94049 by entering 9404* as the zip-pattern value.

Associated recurring elements


When the zip-pattern parameter is associated with a shipping method, the us-zip-area and flat-rate-shipping elements need to be numbered. When the zip-pattern parameter is associated with a default tax table, the default-tax-rule and us-zip-area elements must both be numbered. When the zip-pattern parameter is associated with an alternate tax table, the alternate-tax-table, alternate-tax-rule and us-zip-area elements must all be numbered.

API commands


Content format for parameter value


String

Sample use(s)


<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-#.shipping-restrictions.[allowed-areas | excluded-areas].us-zip-area-#.zip-pattern" value="100*"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.default-tax-rule-#.tax-areas.us-zip-area-#.zip-pattern" value="100*"/>

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.alternate-tax-tables.alternate-tax-table-#.alternate-tax-rule-#.tax-areas.us-zip-area-#.zip-pattern" value="94043"/>