# Error objects

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.

#### Error objects

- [`PaymentsError`](https://developers.google.com/pay/api/web/reference/error-objects#PaymentsError)

> [!IMPORTANT]
> **Key Point:** The [request objects](https://developers.google.com/pay/api/web/reference/request-objects) and [response objects](https://developers.google.com/pay/api/web/reference/response-objects) are covered in their respective pages.
>
> #### Request objects
>
> - [`PaymentOptions`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentOptions)
> - [`IsReadyToPayRequest`](https://developers.google.com/pay/api/web/reference/request-objects#IsReadyToPayRequest)
> - [`PaymentDataRequest`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest)
> - [`PaymentDataCallbacks`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataCallbacks)
> - [`PaymentDataRequestUpdate`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequestUpdate)
> - [`MerchantInfo`](https://developers.google.com/pay/api/web/reference/request-objects#MerchantInfo)
> - [`PaymentMethod`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethod)
> - [`TokenizationSpecification`](https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethodTokenizationSpecification)
> - [`CardParameters`](https://developers.google.com/pay/api/web/reference/request-objects#CardParameters)
> - [`BillingAddressParameters`](https://developers.google.com/pay/api/web/reference/request-objects#BillingAddressParameters)
> - [`ShippingAddressParameters`](https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters)
> - [`ShippingOptionParameters`](https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters)
> - [`SelectionOption`](https://developers.google.com/pay/api/web/reference/request-objects#SelectionOption)
> - [`TransactionInfo`](https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo)
> - [`ButtonOptions`](https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions)
> - [`PayPalParameters`](https://developers.google.com/pay/api/web/reference/request-objects#PayPalParameters)
>
> #### Response objects
>
> - [`IsReadyToPayResponse`](https://developers.google.com/pay/api/web/reference/response-objects#IsReadyToPayResponse)
> - [`PaymentData`](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData)
> - [`IntermediatePaymentData`](https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData)
> - [`PaymentMethodData`](https://developers.google.com/pay/api/web/reference/response-objects#PaymentMethodData)
> - [`CardInfo`](https://developers.google.com/pay/api/web/reference/response-objects#CardInfo)
> - [`PaymentMethodTokenizationData`](https://developers.google.com/pay/api/web/reference/response-objects#PaymentMethodTokenizationData)
> - [`DisplayItem`](https://developers.google.com/pay/api/web/reference/response-objects#DisplayItem)
> - [`PaymentAuthorizationResult`](https://developers.google.com/pay/api/web/reference/response-objects#PaymentAuthorizationResult)
> - [`PaymentDataError`](https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError)
> - [`Address`](https://developers.google.com/pay/api/web/reference/response-objects#Address)
> - [`IntermediateAddress`](https://developers.google.com/pay/api/web/reference/response-objects#IntermediateAddress)
> - [`SelectionOptionData`](https://developers.google.com/pay/api/web/reference/response-objects#SelectionOptionData)

## 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](https://developer.mozilla.org/en-US/docs/Web/API/Console/error "MDN JavaScript reference: console.error") 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](https://developers.google.com/pay/api/web/support/how-to-get-help). |
| `INTERNAL_ERROR` | General server error. |