Skip to content

collana pay JS Docs v0.1.0


collana pay JS Docs / GooglePayOptions

Interface: GooglePayOptions

Defined in: types.ts:609

SDK-level options for the native Google Pay provider (Google:GooglePay).

Remarks

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

Example

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

Properties

allowedCardAuthMethods?

optional allowedCardAuthMethods?: ("PAN_ONLY" | "CRYPTOGRAM_3DS")[]

Defined in: types.ts:658

Card authentication methods accepted by the merchant and gateway.

Default Value

['PAN_ONLY', 'CRYPTOGRAM_3DS']


allowedCardNetworks?

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

Defined in: types.ts:652

Card networks accepted by the merchant and gateway.

Default Value

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


billingAddressParameters?

optional billingAddressParameters?: object

Defined in: types.ts:666

Billing address format and phone requirements. 'FULL' requests all address fields.

format?

optional format?: "FULL" | "MIN"

phoneNumberRequired?

optional phoneNumberRequired?: boolean


billingAddressRequired?

optional billingAddressRequired?: boolean

Defined in: types.ts:664

Whether a billing address is required from the payer.


callbackIntents?

optional callbackIntents?: ("PAYMENT_AUTHORIZATION" | "SHIPPING_ADDRESS" | "SHIPPING_OPTION")[]

Defined in: types.ts:674

Google Pay callback intents that trigger paymentDataCallbacks.

Default Value

['PAYMENT_AUTHORIZATION']

Remarks

See CallbackIntent.


countryCode?

optional countryCode?: string

Defined in: types.ts:621

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


currencyCode

currencyCode: string

Defined in: types.ts:619

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


emailRequired?

optional emailRequired?: boolean

Defined in: types.ts:660

Whether the payer's email address is required.


gateway

gateway: string

Defined in: types.ts:629

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: types.ts:636

Merchant ID issued by the payment gateway for tokenization.

Remarks

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


merchantId?

optional merchantId?: string

Defined in: types.ts:644

Google Pay merchant ID, required for production.

Remarks

Obtain this from the Google Pay Business Console after completing integration review. Not required in 'TEST' environment.


merchantName?

optional merchantName?: string

Defined in: types.ts:646

Merchant name displayed in the Google Pay payment sheet.


shippingAddressRequired?

optional shippingAddressRequired?: boolean

Defined in: types.ts:662

Whether a shipping address is required from the payer.


totalAmount

totalAmount: number

Defined in: types.ts:617

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.

CollanaPay SDK Documentation