# WooCommerce

## 1. Installing the Copperx Plugin

* In your WordPress dashboard, Choose **`Plugins > Add New`**.
* Search for "Copperx Payment Gateway for WooCommerce" and select the official plugin from Copperx.
* Click **`Install Now`**.
* Once installed, click **`Activate`** to use the plugin.

## **2. Creating a Copperx Account**

* If you haven't already, sign up for a Copperx account.
* Follow the onboarding process:
  * Add your business details.
  * Upload your company's logo and brand colors.
  * Configure wallet addresses for supported cryptocurrencies: Ethereum, Polygon, Solana, and BNB chain.

## **3. Linking to Copperx and Configuring the Plugin**

* In the WordPress admin area, navigate to **`WooCommerce > Settings > Payments`**.
* Locate "Copperx" in the list of available payment gateways.
* Click on the **`Manage`** button alongside Copperx.
* This will direct you to the plugin settings page for further configurations.

## **4. Adding the API Key**

* In your Copperx dashboard, navigate to the **`Developer > API keys`** section.
* Click on "Generate API Key" to produce a unique key that will link your WooCommerce store to your Copperx account.
* Copy the generated API key.
* Return to your WordPress plugin settings and paste the API key into the designated field.

## **5. Setting Up Webhooks**

* In Copperx, navigate to the `**Developer > Webhooks**`
* Under webhook configurations or similar, select **`Add endpoint`**, and insert the URL provided in your WooCommerce plugin settings page.
* Ensure you copy and input any shared secret or additional authentication details as required in the plugin settings to ensure secure communication between Copperx and your WooCommerce store.

## **Testing Integration with Test Mode**

Before fully integrating Copperx crypto payments into your WooCommerce store, utilizing the Test Mode is recommended to ensure smooth and accurate transactions.

### **Steps to Enable Test Mode:**

**Important Note:** Ensure to use the Test Secret Key from [**dashboard.copperx.dev**](http://dashboard.copperx.dev/) for activating Test Mode. This specialized test mode not only ensures a secure and isolated environment for your test transactions but also allows you to view and verify all test payments distinctly from your live mode operations, maintaining a clean and safe separation.

1. **Access WooCommerce Dashboard**:
   * Navigate to **`Payments > Settings`**.
2. **Activate Copperx Test Mode**:
   * Find Copperx in the available payment gateways list.
   * Click on the **`Manage`** button to access its settings.
   * Activate the 'Test Mode' option from the settings.
3. **Retrieve Test Secret Key from Copperx**:

* Navigate to **`Developer > Generate Key`** within your Copperx dev dashboard and copy the 'Test Secret Key'.
* Return to the WooCommerce Copperx settings and paste the key into the designated field.

**Note:** Always obtain the Test Secret Key from [**dashboard.copperx.dev**](http://dashboard.copperx.dev/) to ensure secure and accurate testing.

1. **Perform Test Transactions**:
   * Using the [Copperx faucet](https://dashboard.copperx.dev/faucet), acquire test tokens (e.g., USDC).
   * Initiate test transactions in your WooCommerce store using these tokens.
2. **Verify Transactions**:
   * After conducting test transactions, confirm that the funds reflect correctly in your test wallet.

**Note**: Always ensure you switch off 'Test Mode' and use the live API key when you're ready to accept real crypto payments.

***

**Further Resources**:

* [How to generate an API Key](https://docs.copperx.io/how-to-generate-an-api-key)
* [How to setup a Webhook](https://docs.copperx.io/webhook/how-to-setup-a-webhook)
* [Accept your first payment](https://docs.copperx.io/examples/accept-your-first-payment)

For any queries or assistance, the Copperx support team is available to guide you every step of the way.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.copperx.io/integrations/woocommerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
