Google Pay Control Object

window.ckGooglePay object - controls initialization of Google Pay button.

You can provide either All, One or None of the parameters for enableGooglePay call.

  • amountField specified - in this case Google Pay total amount will be automatically updated whenever amount has changed

  • amountField is not specified - in this case it’s up to you to provide the correct amount for Google Pay. One of the ways to do it is to call window.ckGooglePay.updateAmount manually.

  • iframeField specified - this value will be used to communicate with Google Pay button. This option is especially helpful for Angular clients using shadow DOM.

  • iframeField is not specified - it’s value will be calculated based on data-ifields-id attribute. In this case it must be set to β€œigpβ€œ: data-ifields-id="igp".

EnableGooglePayParams Object

Enable Google Pay example

ckGooglePay.enableGooglePay({amountField: 'amount'});

Last updated