---
updatedAt: 2025-10-03T09:15:36.000Z
agentTools:
  projectIndex: https://docs.buckaroo.io/llms.txt
---

# Integration

To be able to render the Google Pay™ button on your website you need to follow the steps below.

1. **Inject the Buckaroo SDK**

<Anchor label="Buckaroo's ClientSide SDK" target="_blank" href="https://checkout.buckaroo.nl/api/buckaroosdk/script/en">Buckaroo's ClientSide SDK</Anchor> works as a wrapper for <Anchor label="Google's API" target="_blank" href="https://developers.google.com/pay/api/web/overview">Google's API</Anchor>. Inject the following script in your page:

```
<script src="https://checkout.buckaroo.nl/api/buckaroosdk/script" />
```

2. **Initialize the Google Pay Button**

To initialize the Google Pay button you have to create a new GooglePayPayment object by passing the options described below:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Required
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Environment
      </td>

      <td>
        Yes
      </td>

      <td>
        Available values are 'PRODUCTION' or 'TEST'. If not provided it will default to 'TEST'.
        For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/guides/tutorial#js-load">Google Pay Documentation</Anchor> page.
      </td>
    </tr>

    <tr>
      <td>
        AllowedCardNetworks
      </td>

      <td>
        No
      </td>

      <td>
        For now available brands are 'VISA' and 'Mastercard'. If not provided it will default to all available card brands.
      </td>
    </tr>

    <tr>
      <td>
        AllowedCardAuthMethods
      </td>

      <td>
        No
      </td>

      <td>
        See <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#CardParameters">Google Pay Documentation</Anchor> here. If not provided it will default to all available values.
      </td>
    </tr>

    <tr>
      <td>
        ButtonColor
      </td>

      <td>
        No
      </td>

      <td>
        See <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/guides/brand-guidelines">Google Pay Documentation</Anchor>. If not provided it will default to all available values.
      </td>
    </tr>

    <tr>
      <td>
        ButtonType
      </td>

      <td>
        No
      </td>

      <td>
        See <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/guides/brand-guidelines">Google Pay Documentation</Anchor>. If not provided it will default to all available values.
      </td>
    </tr>

    <tr>
      <td>
        ButtonRadius
      </td>

      <td>
        No
      </td>

      <td>
        See <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/guides/brand-guidelines">Google Pay Documentation</Anchor>. If not provided it will default to all available values.
      </td>
    </tr>

    <tr>
      <td>
        ButtonLocale
      </td>

      <td>
        No
      </td>

      <td>
        See <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/guides/brand-guidelines">Google Pay Documentation</Anchor>. If not provided it will default to all available values.
      </td>
    </tr>

    <tr>
      <td>
        ButtonContainerId
      </td>

      <td>
        Yes
      </td>

      <td>
        The ID of the HTML element you want to append the button to. If not provided it will default to the container id 'google-pay-button-container'.
      </td>
    </tr>

    <tr>
      <td>
        TotalPriceStatus
      </td>

      <td>
        Yes
      </td>

      <td>
        The status of the total price used:

        <strong>ESTIMATED</strong> — total price might adjust based on the details of the response (e.g., sales tax).

        <strong>FINAL</strong> — total price doesn't change from the amount presented to the shopper. For more information see Google Pay Documentation.
      </td>
    </tr>

    <tr>
      <td>
        TotalPrice
      </td>

      <td>
        Yes
      </td>

      <td>
        Total monetary value of the transaction with an optional decimal precision of two decimal places. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        CurrencyCode
      </td>

      <td>
        Yes
      </td>

      <td>
        The ISO 4217 alphabetic currency code. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        CountryCode
      </td>

      <td>
        Yes
      </td>

      <td>
        The ISO 3166-1 alpha-2 country code where the transaction is processed. Required for EEA countries. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        MerchantName
      </td>

      <td>
        Yes
      </td>

      <td>
        Merchant name encoded as UTF-8. Merchant name is rendered in the payment sheet. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#MerchantInfo">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        MerchantId
      </td>

      <td>
        Yes
      </td>

      <td>
        A Google merchant identifier issued after registration with the <Anchor label="Google Pay & Wallet Console" target="_blank" href="https://pay.google.com/business/console/">Google Pay & Wallet Console</Anchor>. The merchant ID can have 12–18 characters. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#MerchantInfo">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        MerchantOrigin
      </td>

      <td>
        No
      </td>

      <td>
        The fully qualified domain of the merchant who made the request. Ignore this if you are using the Direct Integration.
      </td>
    </tr>

    <tr>
      <td>
        GatewayMerchantId
      </td>

      <td>
        Yes
      </td>

      <td>
        The merchant unique ID provided by Buckaroo after onboarding. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#gateway">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        OnGooglePayLoadError()
      </td>

      <td>
        Yes
      </td>

      <td>
        Callback function that is triggered when the Google PaymentsClient fails to initialize or the Google Pay button cannot be added properly.
      </td>
    </tr>

    <tr>
      <td>
        ProcessPayment()
      </td>

      <td>
        Yes
      </td>

      <td>
        Callback function that handles the processing of the payment. Once the <Anchor label="token" target="_blank" href="https://developers.google.com/pay/api/web/reference/response-objects#PaymentMethodTokenizationData">token</Anchor> is retrieved you can send it for further processing towards our Checkout as explained in the next point below.
      </td>
    </tr>

    <tr>
      <td>
        ShippingAddressRequired
      </td>

      <td>
        No
      </td>

      <td>
        Set to true to request a full shipping address. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        ShippingAddressParameters
      </td>

      <td>
        No
      </td>

      <td>
        If <code>shippingAddressRequired</code> is set to true, specify shipping address restrictions. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        ShippingOptionRequired
      </td>

      <td>
        No
      </td>

      <td>
        Set to true when the <code>SHIPPING_OPTION</code> callback intent is used. This field is required if you implement support for Authorize Payments or Dynamic Price Updates. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest">Google Pay Documentation</Anchor>.
      </td>
    </tr>

    <tr>
      <td>
        ShippingOptionParameters
      </td>

      <td>
        No
      </td>

      <td>
        Set default options. For more information see <Anchor label="Google Pay Documentation" target="_blank" href="https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest">Google Pay Documentation</Anchor>.
      </td>
    </tr>
  </tbody>
</Table>

Once you have created the GooglePayPayment object then you need to call the **initiate()** function. Below is a demo of initializing the Google Pay Button:

```
function initGooglePayButton() {
    const googlePayPayment = new BuckarooSdk.GooglePay.GooglePayPayment({
        environment: 'TEST',
        buttonRadius: 7,
        buttonSizeMode: 'fill',
        buttonContainerId: 'google-pay-button-container',
        totalPriceStatus: 'FINAL',
        totalPrice: '0.1',
        currencyCode: 'EUR',
        countryCode: 'NL',
        merchantName: 'Example Merchant',
        merchantId: '01234567890123456789',
        gatewayMerchantId: 'exampleGatewayMerchantId',
        onGooglePayLoadError: (error) => {
            console.error('Error loading GooglePay script:', error);
        },
        processPayment: (paymentData) => {
                // Process Payment Callback logic
        },
    });
    
    googlePayPayment.initiate();
}
```