Take the Survey | English | Site Directory

Google Checkout APIs

Google Checkout Basic HTML Integration

Google Checkout lets your customers buy items from you quickly and securely using a Google username and password. Google Checkout lets you charge customers' credit cards, track orders through your fulfillment process and receive order payments in your bank account.

This document explains how to integrate your website with Google Checkout by including basic order information inside HTML forms on your web pages. The HTML below shows a sample form that contains an order for a jar of peanut butter. The hidden fields in the form indicate that there is one shipping method available for the order and that the merchant charges tax of 8.75 percent if the order is shipped to New York.

Testing Google Checkout Sample Code

You can copy the HTML in the sample form directly into your web page to test Google Checkout on your site. However, for the example to work, you must make two small changes to the HTML. You must also sign up for a Google Checkout merchant account and update the Shopping cart post security setting to allow your account to accept shopping carts submitted using HTML forms.

  1. In the second line of the sample, the value of the <form> tag's action attribute contains the number "1234567890". You must replace this number with your own Merchant ID. To obtain a Merchant ID, you must complete steps 1, 2 and 3 of the Google Checkout sign-up process. Those steps explain how to set up your Google Checkout account, how to sign into your account and get your Merchant ID, and how to configure your account to accept orders submitted using HTML forms. Please note that you will receive an error if you try to submit an order using HTML forms and you have not disabled the extra shopping cart security setting described in step 3 of the sign-up process.

  2. The image tag in the example also contains the number "1234567890". You must also replace this number with your Merchant ID.

After you make these changes, you will be able to submit the form from your website to Google Checkout. You can also complete the order if you wish. After you submit the order, you can sign in to the Google Checkout Merchant Center to see how you would manage Google Checkout orders. (You can also cancel the order in the Merchant Center.)

Other Checkout Features and Additional Integration Options

Please note that several Google Checkout features are not available to merchants who integrate with Google Checkout using the basic HTML integration as described in this document set. Additional Google Checkout features including those in the following list can be accessed through either the HTML API or the XML API.

  • The XML API allows you to digitally sign orders before submitting them to Google. In addition, both the XML API and the HTML API explain how to submit orders using server-to-server transactions. However, if you complete a basic HTML integration, you will need to manually review all orders before charging customers and fulfilling orders to ensure that the prices and other information in those orders are correct.

  • The XML and HTML APIs allow you to set different tax rates for different locations. Those integration options also enable you to apply different tax rates to different items in the same order. A basic HTML integration only allows you to charge tax in one area, and the tax rate will apply to all items in the order.

  • The XML and HTML APIs enable you to operate a service that calculates shipping costs, taxes, and discounts from coupons or gift certificates after the buyer selects the shipping address for an order. Using a basic HTML integration, you can define different shipping methods, but you cannot recalculate the cost of each shipping method when the buyer selects a shipping address.

  • The XML and HTML APIs explain how you can integrate your internal order processing systems with Google Checkout. This additional level of integration allows your systems to communicate with Google Checkout so that you can programmatically instruct Google to charge customers, mark orders as shipped or issue refunds.

Next »
(Buyer Experience)