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
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?
optionalallowedCardAuthMethods?: ("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?
optionalallowedCardNetworks?: ("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?
optionalbillingAddressParameters?:object
Defined in: types.ts:666
Billing address format and phone requirements. 'FULL' requests all address fields.
format?
optionalformat?:"FULL"|"MIN"
phoneNumberRequired?
optionalphoneNumberRequired?:boolean
billingAddressRequired?
optionalbillingAddressRequired?:boolean
Defined in: types.ts:664
Whether a billing address is required from the payer.
callbackIntents?
optionalcallbackIntents?: ("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?
optionalcountryCode?: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?
optionalemailRequired?: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?
optionalmerchantId?: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?
optionalmerchantName?:string
Defined in: types.ts:646
Merchant name displayed in the Google Pay payment sheet.
shippingAddressRequired?
optionalshippingAddressRequired?: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.
