# MD for: https://www.mercadopago.com.br/developers/es/docs/google-pay/resources/possible-errors.md \# Possible errors Below are the most common errors when integrating Google Pay, their causes and how to solve them. Handle separately the wallet initialization failures, the failures during the interaction with Google Pay and the processing results from Mercado Pago. ## Google Pay and SDK errors | Scenario | What to check or do | | --- | --- | | The page does not use HTTPS | HTTPS is required; Google Pay does not work over HTTP. Serve the checkout over HTTPS before initializing the integration. | | The container was not found | Confirm that the element exists before the call to \`create\` and that its \`id\` matches the one provided. | | Google Pay is unavailable for the store | Confirm with your commercial contact whether the account is enabled for Google Pay in Mercado Pago. | | Google Pay is unavailable for the buyer | Check the device, browser and eligible card requirements. Keep another payment method available. | | Google Pay works in testing but fails in production | Review the site's approval, the Merchant ID and the \_Public Key\_ used. | | The Merchant ID is missing or incorrect | Fill in \`merchantInfo.merchantId\` with the identifier provided by Google for your integration, with 12 to 18 characters. | | The Google Pay library did not load | Check network blocks, extensions and page loading policies, such as the Content-Security-Policy. | | The buyer closed the Google Pay screen | Handle \`onCancel\` and let the buyer continue in the checkout. | | There was an authorization or tokenization failure | Handle \`onError\`, show an understandable message and allow a new attempt or the choice of another payment method. | | The token was generated, but the payment was rejected | Check the result returned by Mercado Pago. Tokenization does not guarantee approval. | | Communication with the backend failed | Check the status of the operation before starting a new charge and keep the idempotency key when repeating the same request. | For failures in \`create\`, handle the Promise rejection. For failures during authorization or tokenization, use \`onError\`. Errors returned by the Orders API must be handled in the backend. ## Orders API errors Google Pay processes payments with the Orders API, so the errors returned when creating the order are the same as in Checkout Transparente. See the full list of codes, messages and possible solutions in: \[Checkout Transparente possible errors\](https://www.mercadopago.com.br/developers/en/docs/checkout-api-orders/payment-management/integration-errors/api). ## Best practices and support There are some standard guidelines that contribute to greater security and a better experience for your Google Pay integration. Learn more about each of them below. - Keep the \_Access Token\_ exclusively in the backend and use only the \_Public Key\_ in the frontend. - Make sure the domain where the Google Pay button is displayed uses HTTPS. The SDK requires it for the button to appear on the screen. To do this, install an SSL certificate on your site. - Validate the amounts and the purchase data in the backend before processing the payment. - Send the token only for payment processing. Do not store it in \`localStorage\`, \`sessionStorage\`, cookies, logs or analytics tools, and log only what is needed to investigate failures. - Keep other payment methods in the checkout so that all buyers can complete the purchase, including those who cannot use Google Pay. - Tell the buyer when the payment is being processed and show the result according to Mercado Pago's response. If the buyer closes the Google Pay screen, let them continue in the checkout. - Before repeating an operation with an unknown status, check its result to avoid duplicate charges. If you need help, see our \[Support\](https://www.mercadopago.com.br/developers/en/support) section for questions about account enablement, tokenization or payment processing. For questions about registration, Merchant ID and site approval, go to the \[Google Pay & Wallet Console\](https://pay.google.com/business/console).