Skip to main content
Troubleshooting is an important part of integrating with the PayPal Orders API. The following provides explanations and solutions to help you quickly find and fix issues in your integration.

HTTP status codes and error messages

The following table lists the most common HTTP status codes and error messages returned by the Orders v2 API.

Error samples

The following examples show common error scenarios for the Orders v2 API. Each sample includes a request and the corresponding error response.

Internal server error (500)

The Orders v2 API returns a 500 status code when the server encounters an unexpected condition. The following sample shows a response when the server has an underlying issue or does not handle an internal exception.

Create order request

Error response

Unprocessable entity error (422)

The Orders v2 API returns a 422 status code when an order fails business validation. For example, this can happen if the payer uses an expired payment card. The following sample shows a create order request with an expired card and the resulting error response.

Create order request

Error response

Bad request (400)

The Orders v2 API returns a 400 status code when a request includes an incorrect or unsupported value. The following sample shows a create order request with an invalid usage_pattern and the resulting error response.

Create order request

Error response

Forbidden (403)

The Orders v2 API returns a 403 status code when the API caller or payee does not have the required permissions for the request. The following sample shows a create order request that sets items.category to DONATION without the necessary permissions.

Create order request

Error response