English | Site Directory

Google Checkout APIs

Google Checkout Technical Overview

When you integrate with Google Checkout, your site must display a Google Checkout button in addition to your regular checkout options. The button will be contained within a form on your page, and that form will also contain hidden input fields that contain information about the items in the customer's shopping cart.

This section defines the input fields that you can use in Google Checkout HTML forms. Please note that some field names end with a pound sign (#), such as item_name_#. These names actually identify an item in a list, and you need to replace the pound sign with a numeral corresponding to an order in a list. As such, the first item added to a shopping cart uses the field names item_name_1 and item_description_1 while the second item uses the field names item_name_2 and item_description_2.

HTML forms that submit to Google Checkout must also include the following elements:

  • The <form> tag's action attribute must contain the following URL. Please note that you must replace the text MERCHANT_ID with your merchant ID. Please see step 2 of the sign-up process for information about how to find your merchant ID.

    https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/MERCHANT_ID
    
  • The <form> tag must specify the accept-charset attribute with the value utf-8.

    <form method="POST"
          action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/MERCHANT_ID"
          accept-charset="utf-8">
    
  • The form must contain the following hidden input field:

    <input type="hidden" name="_charset_"/>
    
  • For each item in the order, the form must include a value for the following input fields: item_name_#, item_description_# and item_price_#. These required fields are marked with an asterisk (*) in the lists below.

Item-Level Input Fields

  • item_name_# * - The parameter value identifies the name of the item.
  • item_description_# * - The parameter value provides a description of the item.
  • item_quantity_# - The parameter value specifies how many units of a particular item are included in the customer's shopping cart.
  • item_price_# * - The parameter value specifies the price of the item.
  • item_currency_# - The parameter value identifies the currency for the item price. The default value is USD (U.S. dollars).
  • item_merchant_id_# - The parameter value contains an ID that you use to uniquely identify the item.

Shipping Input Fields

Google Checkout allows you to provide one or more shipping options for an order. If you specify more than one shipping option, Google Checkout will display a pulldown menu that lists those options on the Place Order page. The buyer will need to select a shipping option from the menu before completing the order. If you do not specify any shipping options, Google Checkout will not add any shipping charges to the order.

  • ship_method_name_# - The parameter value identifies the name of a shipping option that is available for the order.
  • ship_method_price_# - The parameter value identifies the cost of a shipping option.
  • ship_method_currency_# - The parameter value identifies the currency for the shipping price. The default value is USD (U.S. dollars).
  • ship_method_us_area_# - The parameter value identifies an area of the United States where a shipping method is available.
  • ship_method_country_# - The parameter value identifies a country where a shipping option is available.
  • ship_method_region_# - The parameter value identifies a state or region where a shipping option is available.
  • ship_method_city_# - The parameter value identifies a city where a shipping option is available.
  • ship_method_world_# - This parameter indicates that a merchant ships anywhere in the world.

Note: An order may not specify two or more shipping methods that have the same name. Shipping method names are contained in the ship_method_name_# input field. To verify that all names are unique, Google Checkout trims whitespace characters from the beginning and the end of the shipping method's name. Google Checkout then does a case-insensitive comparison of the names to ensure that they are unique. For example, Google Checkout would consider all of these names to be identical:

Regular shipping
REGULAR SHIPPING
    Regular shipping
ReGuLaR sHiPPing

Tax Input Fields

The tax input fields enable you to indicate where you charge taxes for orders. When a buyer selects a shipping address in the area where you charge taxes, the tax rate that you specify will be charged for all items in the order. However, if the buyer specifies a shipping address in another area, Google Checkout will not charge tax for the order. Similarly, if you do not specify a tax rate and the area where you charge tax, Google Checkout will not charge tax for the order.

You can use the following HTML input fields to specify your tax rate and the area where you charge taxes:

  • tax_rate - The parameter value specifies the tax rate that you charge.
  • tax_us_state - The parameter value identifies the U.S. state in which you charge tax.
  • tax_world - The parameter value indicates that you charge tax on all orders regardless of the buyer's location.
  • tax_country - The parameter value identifies a country where you charge tax.
  • tax_region - The parameter value identifies a region where you charge tax.
  • tax_city - The parameter value identifies a city where you charge tax.
  • tax_postal - The parameter value identifies a postal code where you charge tax.

Shopping Cart Input Fields

  • edit_url - The parameter value provides a URL where the buyer can change the items in his shopping cart.
  • continue_url - The parameter value provides a URL where the buyer can continue shopping on your site after completing a purchase through Google Checkout.

« Previous
(Working with a Development Site)
Next »
(Google Checkout Buttons)