# Error codes (/payment-methods/error-codes)



The following error codes can be returned in the cancel URL the merchant receives. The format for the error codes returned in the cancel URL is: `example.com/checkout/cancel?errorcode=internal_server_error&token=XXX`.

> **Note:** Note: The query parameters in the cancel URL are not case sensitive.

| Error code                                 | Description                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `order_not_confirmed`                      | The order hasn't been validated. You might see this error when the order status is not in the `PAYER_ACTION_REQUIRED` state or when a payment method hasn't been attached to the order. <br /><br /> Call the [Confirm payment method](/api/orders/v2/orders-confirm/) endpoint.                                                                                    |
| `system_config_error`                      | An authentication failure has occurred or the request is invalid.                                                                                                                                                                                                                                                                                                   |
| `invalid_payment_method`                   | An unexpected payment method is attached to the order. This can happen when the wrong order ID is attached to a payment method.<br /><br /> Confirm the order ID is correct.                                                                                                                                                                                        |
| `payee_not_enabled_for_payment_method`     | You aren't authorized to accept this payment method.                                                                                                                                                                                                                                                                                                                |
| `payment_method_change_not_allowed`        | Related to idempotency check. <br /><br /> Make sure the following aren't missing or incorrect: the `PayPal-Request-Id`, the payment ID, and the payment payload.                                                                                                                                                                                                   |
| `processing_error`                         | Related to idempotency check. <br /><br /> The `PayPal-Request-Id` and payload match an order, but the order is no longer in the `PENDING` state.                                                                                                                                                                                                                   |
| `min_amount_required_by_payment_method`    | The transaction amount doesn't meet the minimum transaction requirement of the payment method.                                                                                                                                                                                                                                                                      |
| `payment_method_error`                     | The transaction initiation was declined by the payment method.                                                                                                                                                                                                                                                                                                      |
| `declined_by_payment_method`               | The transaction initiation was declined by the payment method.                                                                                                                                                                                                                                                                                                      |
| `currency_not_supported_by_payment_method` | The currency specified isn't supported by the payment method.                                                                                                                                                                                                                                                                                                       |
| `country_not_supported_by_payment_method`  | The country specified isn't supported by the payment method.                                                                                                                                                                                                                                                                                                        |
| `invalid_expiry_date`                      | Expiry date should be a date in future and within the threshold for the payment source.                                                                                                                                                                                                                                                                             |
| `unsupported_processing_instruction`       | The specified `processing_instruction` isn't supported for the given `payment_source`. Please refer to [`processing_instruction`](/api/orders/v2) for the list of `payment_source` options that you can use for this value.                                                                                                                                         |
| `order_complete_on_payment_approval`       | A `processing_instruction` of `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` is required for the specified `payment_source`.                                                                                                                                                                                                                                                  |
| `order_completion_in_progress`             | The order was created with a `processing_instruction` of `ORDER_COMPLETE_ON_PAYMENT_APPROVAL`. The customer has approved the payment and PayPal is still in the process of capturing the order on your behalf as instructed. Please try your request again.                                                                                                         |
| `internal_server_error`                    | This error includes: encryption/description, database connection issues, timeouts, and unknown errors.                                                                                                                                                                                                                                                              |
| `not_enabled_for_payment_source`           | The API caller or payee can't process the selected payment source. If you have already completed the steps to authorize the API caller or payee, allow 2 business days for PayPal to complete the setup. If you continue to receive this error, contact your Account Manager or [check the request status](https://www.paypal.com/businessmanage/account/payments). |
| `payment_error`                            | All other errors.                                                                                                                                                                                                                                                                                                                                                   |
