# PY02001: Payment Gateway Error

## What This Means[​](#what-this-means "Directe link naar What This Means")

An error occurred while communicating with the payment gateway. The payment processor couldn't complete the request.

## Common Causes[​](#common-causes "Directe link naar Common Causes")

* **Gateway downtime** — The payment service is experiencing issues
* **Configuration error** — Gateway settings are incorrect
* **API credentials** — Invalid or expired API keys
* **Network issues** — Connection problems to the gateway

## How to Fix[​](#how-to-fix "Directe link naar How to Fix")

### 1. Retry the Transaction[​](#1-retry-the-transaction "Directe link naar 1. Retry the Transaction")

Sometimes gateways have temporary issues:

* Wait a moment
* Try processing the payment again
* The issue may resolve itself

### 2. Check Gateway Status[​](#2-check-gateway-status "Directe link naar 2. Check Gateway Status")

Visit your payment provider's status page:

* Stripe: status.stripe.com
* PayPal: Check PayPal community or status
* Square: status.squareup.com
* Check for known outages

### 3. Verify Gateway Configuration[​](#3-verify-gateway-configuration "Directe link naar 3. Verify Gateway Configuration")

In WooCommerce Admin:

1. Go to WooCommerce → Settings → Payments
2. Click on your payment gateway
3. Verify API keys are correct
4. Check that test/live mode matches your keys

### 4. Check API Credentials[​](#4-check-api-credentials "Directe link naar 4. Check API Credentials")

Ensure credentials are valid:

* API keys haven't expired
* Using live keys for live transactions
* Using test keys for test transactions
* Credentials match the correct account

### 5. Test with a Different Gateway[​](#5-test-with-a-different-gateway "Directe link naar 5. Test with a Different Gateway")

If available:

* Try processing with an alternative gateway
* Use cash payment as a fallback
* Complete the sale and reconcile later

## For Store Owners[​](#for-store-owners "Directe link naar For Store Owners")

Common configuration issues:

* Mixing test and live API keys
* API keys from different accounts
* Disabled payment methods
* Expired or revoked credentials

Contact your payment provider's support if the issue persists.

## Related Errors[​](#related-errors "Directe link naar Related Errors")

* [PY02002](/nl/error-codes/PY02002.md) — Payment Timeout
* [PY01001](/nl/error-codes/PY01001.md) — Payment Declined
