Skip to content

Express Docs v0.1.0


Express Docs / GooglePayOptions

Interface: GooglePayOptions ​

Defined in: src/types.ts:821

SDK-level options for the Google Pay provider.

Remarks ​

These values configure the Google Pay JS API request. See Google Pay API docs.

Example ​

ts
const googlePayButton: ProviderButtonConfig<'Computop:GooglePay'> = {
  providerProtocolType: 'Computop',
  paymentMethodType: 'GooglePay',
  container: '#googlepay-container',
  style: { buttonColor: 'black', buttonType: 'buy' },
  options: {
    totalAmount: 19300,
    currencyCode: 'USD',
    countryCode: 'US',
    gateway: 'example',
    gatewayMerchantId: 'exampleMerchantId',
    merchantName: 'Example Merchant',
  },
};

Extends ​

  • CheckoutFlowFlags

Properties ​

allowedCardNetworks? ​

optional allowedCardNetworks?: ("AMEX" | "DISCOVER" | "INTERAC" | "JCB" | "MASTERCARD" | "VISA")[]

Defined in: src/types.ts:867

Card networks accepted by the merchant and gateway.

Default Value ​

['AMEX', 'DISCOVER', 'INTERAC', 'JCB', 'MASTERCARD', 'VISA']


countryCode ​

countryCode: string

Defined in: src/types.ts:833

ISO 3166-1 alpha-2 country code (e.g. 'US', 'DE').


currencyCode ​

currencyCode: string

Defined in: src/types.ts:831

ISO 4217 currency code (e.g. 'USD', 'EUR').


displayItems? ​

optional displayItems?: GooglePayDisplayItem[]

Defined in: src/types.ts:883

Line items displayed in the Google Pay payment sheet below the total.

Remarks ​

Use this to show a breakdown of costs (subtotal, tax, fees, etc.).

See ​

https://developers.google.com/pay/api/web/reference/request-objects#DisplayItem


gateway ​

gateway: string

Defined in: src/types.ts:841

Payment gateway identifier passed to the Google Pay tokenization spec.

Remarks ​

Must match a gateway supported by Google Pay (e.g. 'computop', 'stripe'). See supported gateways.


gatewayMerchantId ​

gatewayMerchantId: string

Defined in: src/types.ts:848

Merchant ID issued by the payment gateway for tokenization.

Remarks ​

This is the gateway-specific merchant account ID, not a Google Pay merchant ID.


googleMerchantId? ​

optional googleMerchantId?: string

Defined in: src/types.ts:861

Google Pay merchant ID from the Google Pay & Wallet Console.

Remarks ​

Distinct from GooglePayOptions.gatewayMerchantId, which is always required. The production build rejects a render without it; the sandbox build accepts and ignores it, so the same value can be configured for both. Optional in the type so sandbox integrations can omit it — set it before going live.


isBillingCustomerDataRequired? ​

optional isBillingCustomerDataRequired?: boolean

Defined in: src/types.ts:910

When true, the integrator's backend already supplies the customer's billing address and Google Pay should not request it from the payer. When false or unset (default), Google Pay collects the billing address.

Maps (inverted) to the Google Pay billingAddressRequired request flag (both at the top level and inside the card payment method's parameters.billingAddressRequired).

Default Value ​

false — Google Pay collects billing address

Overrides ​

CheckoutFlowFlags.isBillingCustomerDataRequired


isShippingCustomerDataRequired? ​

optional isShippingCustomerDataRequired?: boolean

Defined in: src/types.ts:898

When true, the integrator's backend already supplies the customer's shipping address and Google Pay should not request it from the payer. When false or unset (default), Google Pay collects the shipping address and payer contact (name, email, phone).

Maps (inverted) to the Google Pay shippingAddressRequired request flag, and gates payer contact fields:

  • shippingAddressRequired = !isShippingCustomerDataRequired
  • emailRequired = !isShippingCustomerDataRequired
  • phoneNumberRequired = !isShippingCustomerDataRequired

Default Value ​

false — Google Pay collects shipping address and payer contact

Overrides ​

CheckoutFlowFlags.isShippingCustomerDataRequired


merchantName ​

merchantName: string

Defined in: src/types.ts:850

Merchant name displayed in the Google Pay payment sheet.


pspAutoCaptureEnabled ​

pspAutoCaptureEnabled: boolean

Defined in: src/types.ts:263

When true (default), the payment is captured immediately after authorization. When false, the payment is authorized only and must be captured separately.

Remarks ​

This flag is mapped to the provider-native concept:

  • PayPal / Braintree / Adyen PayPal → intent: 'capture' (true) / 'authorize' (false)
  • Stripe → captureMethod: 'automatic' (true) / 'manual' (false)

Inherited from ​

CheckoutFlowFlags.pspAutoCaptureEnabled


supportedShippingCountries? ​

optional supportedShippingCountries?: string[]

Defined in: src/types.ts:921

List of ISO 3166-1 alpha-2 country codes to which the merchant ships. When set and non-empty, the Google Pay sheet validates the selected shipping address country in onPaymentDataChanged and surfaces a SHIPPING_ADDRESS_UNSERVICEABLE error when it is not included. When omitted or set to an empty array, all countries are accepted.

Example ​

ts
`['DE', 'AT', 'CH']` — restrict to DACH region

Default Value ​

undefined — all countries accepted


totalAmount ​

totalAmount: number

Defined in: src/types.ts:829

Transaction amount in minor units (e.g. 19300 = $193.00).

Remarks ​

Divided by 100 and formatted to two decimal places for the Google Pay TransactionInfo.totalPrice field.


totalPriceLabel? ​

optional totalPriceLabel?: string

Defined in: src/types.ts:874

Custom label for the total price row in the payment sheet (e.g. 'Total').

Remarks ​

If omitted, Google Pay uses its default label.

collana pay SDK Documentation