Error objects
Stay organized with collections Save and categorize content based on your preferences.
This reference describes the Google Pay API error object options to use with your website. Error objects are objects that are returned by a rejected promise from a client JavaScript method.
PaymentsError
This object contains details about errors returned by client JavaScript methods. Errors might not be displayed in a user-facing dialog.
Property | Type | Description |
statusCode | string | Short code that describes the type of error. |
statusMessage | string | Developer-facing message that describes the error encountered and possible steps to correct it. |
Common errors
This object displays errors that you might encounter across all JavaScript methods. Be sure to check the developer console for additional error messages.
Status Code | Description |
BUYER_ACCOUNT_ERROR | The current Google user is unable to provide payment information. |
DEVELOPER_ERROR | A passed parameter is improperly formatted. An error message may appear in the browser console for all configured environments. |
MERCHANT_ACCOUNT_ERROR | The site accessing the Google Pay API does not have the right permission. This could be due to either an incorrect configuration or an incorrect merchant identifier set in the request. Check the statusMessage field for more details. If you continue to have trouble, please contact support. |
INTERNAL_ERROR | General server error. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[[["\u003cp\u003eThis reference guide details Google Pay API error objects for websites.\u003c/p\u003e\n"],["\u003cp\u003eThese error objects provide information about why a Google Pay request failed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePaymentsError\u003c/code\u003e object includes a status code and message to help you debug.\u003c/p\u003e\n"],["\u003cp\u003eCommon Google Pay API errors include buyer, developer, and merchant account issues.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the linked resources for details on request and response objects related to Google Pay.\u003c/p\u003e\n"]]],["The provided content outlines Google Pay API error objects and related components for website integration. `PaymentsError` objects, returned from rejected promises, detail errors with `statusCode` and `statusMessage`. Common error codes include `BUYER_ACCOUNT_ERROR`, `DEVELOPER_ERROR`, `MERCHANT_ACCOUNT_ERROR`, and `INTERNAL_ERROR`, indicating issues with user accounts, parameter formatting, merchant permissions, and general server malfunctions, respectively. The document also references request and response objects, each with specific structures, described in separate pages.\n"],null,["This reference describes the Google Pay API error object options to use with your website.\nError objects are objects that are returned by a rejected promise from a client JavaScript\nmethod.\n\nError objects\n\n- [`PaymentsError`](/pay/api/web/reference/error-objects#PaymentsError)\n| **Key Point:** The [request objects](/pay/api/web/reference/request-objects) and [response objects](/pay/api/web/reference/response-objects) are covered in their respective pages.\n|\n| Request objects\n|\n| - [`PaymentOptions`](/pay/api/web/reference/request-objects#PaymentOptions)\n| - [`IsReadyToPayRequest`](/pay/api/web/reference/request-objects#IsReadyToPayRequest)\n| - [`PaymentDataRequest`](/pay/api/web/reference/request-objects#PaymentDataRequest)\n| - [`PaymentDataCallbacks`](/pay/api/web/reference/request-objects#PaymentDataCallbacks)\n| - [`PaymentDataRequestUpdate`](/pay/api/web/reference/request-objects#PaymentDataRequestUpdate)\n| - [`MerchantInfo`](/pay/api/web/reference/request-objects#MerchantInfo)\n| - [`PaymentMethod`](/pay/api/web/reference/request-objects#PaymentMethod)\n| - [`TokenizationSpecification`](/pay/api/web/reference/request-objects#PaymentMethodTokenizationSpecification)\n| - [`CardParameters`](/pay/api/web/reference/request-objects#CardParameters)\n| - [`BillingAddressParameters`](/pay/api/web/reference/request-objects#BillingAddressParameters)\n| - [`ShippingAddressParameters`](/pay/api/web/reference/request-objects#ShippingAddressParameters)\n| - [`ShippingOptionParameters`](/pay/api/web/reference/request-objects#ShippingOptionParameters)\n| - [`SelectionOption`](/pay/api/web/reference/request-objects#SelectionOption)\n| - [`TransactionInfo`](/pay/api/web/reference/request-objects#TransactionInfo)\n| - [`ButtonOptions`](/pay/api/web/reference/request-objects#ButtonOptions)\n| - [`PayPalParameters`](/pay/api/web/reference/request-objects#PayPalParameters)\n|\n| Response objects\n|\n| - [`IsReadyToPayResponse`](/pay/api/web/reference/response-objects#IsReadyToPayResponse)\n| - [`PaymentData`](/pay/api/web/reference/response-objects#PaymentData)\n| - [`IntermediatePaymentData`](/pay/api/web/reference/response-objects#IntermediatePaymentData)\n| - [`PaymentMethodData`](/pay/api/web/reference/response-objects#PaymentMethodData)\n| - [`CardInfo`](/pay/api/web/reference/response-objects#CardInfo)\n| - [`PaymentMethodTokenizationData`](/pay/api/web/reference/response-objects#PaymentMethodTokenizationData)\n| - [`DisplayItem`](/pay/api/web/reference/response-objects#DisplayItem)\n| - [`PaymentAuthorizationResult`](/pay/api/web/reference/response-objects#PaymentAuthorizationResult)\n| - [`PaymentDataError`](/pay/api/web/reference/response-objects#PaymentDataError)\n| - [`Address`](/pay/api/web/reference/response-objects#Address)\n| - [`IntermediateAddress`](/pay/api/web/reference/response-objects#IntermediateAddress)\n| - [`SelectionOptionData`](/pay/api/web/reference/response-objects#SelectionOptionData)\n\nPaymentsError\n\nThis object contains details about errors returned by client JavaScript methods. Errors might not\nbe displayed in a user-facing dialog.\n\n| Property | Type | Description |\n|-----------------|--------|-------------------------------------------------------------------------------------------------|\n| `statusCode` | string | Short code that describes the type of error. |\n| `statusMessage` | string | Developer-facing message that describes the error encountered and possible steps to correct it. |\n\nCommon errors\n\nThis object displays errors that you might encounter across all JavaScript methods. Be sure\nto check the developer console for additional error messages.\n\n| Status Code | Description |\n|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `BUYER_ACCOUNT_ERROR` | The current Google user is unable to provide payment information. |\n| `DEVELOPER_ERROR` | A passed parameter is improperly formatted. An [error message may appear in the browser console](https://developer.mozilla.org/en-US/docs/Web/API/Console/error \"MDN JavaScript reference: console.error\") for all configured environments. |\n| `MERCHANT_ACCOUNT_ERROR` | The site accessing the Google Pay API does not have the right permission. This could be due to either an incorrect configuration or an incorrect merchant identifier set in the request. Check the `statusMessage` field for more details. If you continue to have trouble, please [contact support](https://developers.google.com/pay/api/web/support/how-to-get-help). |\n| `INTERNAL_ERROR` | General server error. |"]]