| Note: This is the latest documentation. The previous version of this page is identical — only the left nav differs. |
The Google Checkout Program Policies and Guidelines (section 4b) state that you must place a Google Checkout button immediately beside, above or below every existing checkout button or link on your website.
Google hosts the image for the Google Checkout buttons that you place on your pages. The base URL for the image is http://checkout.google.com/buttons/checkout.gif.
To display an image, you must add several parameters to the base URL as name=value pairs. The following table lists the parameters that you need to add to the Google Checkout button image. All parameters are required unless otherwise noted.
| Parameter | Description |
|---|---|
| merchant_id | This parameter identifies your Merchant ID. Note: You need to use different Merchant IDs for buttons in your test and production environments. Please see the Getting Started with Google Checkout section for more details. |
| w | This parameter specifies the width of the button in pixels. You must use one of the sizes in the following list. Valid values for the w parameter are shown in bold text.
|
| h | This parameter specifies the height of the button in pixels. You must use one of the sizes in the following list. Valid values for the h parameter are shown in bold text.
|
| style | This parameter specifies the background color for the button. Use the parameter value white to indicate that you are placing the button on a white background and the value trans to indicate that you are placing the button on a colored background. |
| variant | This value indicates whether the button is clickable or disabled. Use the parameter value text to indicate that the button is clickable and the value disabled to indicate that the button is disabled. You should only display a disabled button if the Google Checkout option is not available for a particular order. Please see the Google Checkout Content policies for details about the types of items that may not be sold through Google Checkout. |
| loc | Optional. This parameter identifies a locale associated with the transaction.
|
For example, the following form contains a large Google Checkout button on a white background. The <input> tag for the button is shown in bold text.
<form method="POST"
action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/1234567890">
<input type="image" name="Google Checkout" alt="Fast checkout through Google"
src="http://checkout.google.com/checkout/buttons/checkout.gif?merchant_id=1234567890
&w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
</form>
The button in the form displays the following image:
Note: You can also use the Checkout Button URL Generator to quickly create the URLs for the Checkout buttons that will display on your site.
Google provides Buy Now buttons as a simple way to offer single items for sale through Google Checkout. If you use Buy Now buttons, you do not need to create an HTML form in the manner described in other areas of the Basic HTML API documentation. The Buy Now button will contain all of the information that you need to send to Google for that item.
To create Buy Now buttons, go to the Merchant Center, click the Settings tab and then click the Buy Now buttons link. After you generate the button, copy the code for the button and then paste that code in an appropriate location on your website. For more information about Buy Now buttons, see the Google Checkout Merchant FAQ.
| « Previous (How Checkout Works) |
Next » (Sample Forms) |