> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orderprotection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing the plugin

<Steps>
  <Step title="Download the Plugin">
    You can download the latest plugin version from [here](https://cdn.orderprotection.com/plugins/woocommerce/latest/orderprotection.zip)
  </Step>

  <Step title="Upload plugin">
    Once you have downloaded the plugin you need to unzip the archive and put the plugin at the following location:

    ```
    /wp-content/plugins/orderprotection
    ```
  </Step>

  <Step title="Get your OrderProtection credentials">
    Go to your [OrderProtection Dashboard](https://app.orderprotection.com)

    You will then need to go to `Settings -> API Keys` and generate a new API key.

    <img src="https://mintcdn.com/orderprotectioncom/GDuchlp6KbhScehe/public/assets/img/woo/woo-api-tokens.png?fit=max&auto=format&n=GDuchlp6KbhScehe&q=85&s=2bfdf7fad0a71c19cd9141a3bd0f0ca8" alt="woo-settings-api-tokens" width="1169" height="387" data-path="public/assets/img/woo/woo-api-tokens.png" />

    Make sure to copy the value of this API Key as you will not see it again.

    <img src="https://mintcdn.com/orderprotectioncom/GDuchlp6KbhScehe/public/assets/img/woo/woo-created-api-token.png?fit=max&auto=format&n=GDuchlp6KbhScehe&q=85&s=4fba46743c327a239111b947bd92b06a" alt="woo-created-api-token" width="577" height="262" data-path="public/assets/img/woo/woo-created-api-token.png" />
  </Step>

  <Step title="Activate the plugin">
    In your Wordpress admin you can go to your plugins page. You should see the OrderProtection plugin if step 2 was
    completed successfully. At this point you can click on `Activate` to activate the OrderProtection plugin.

    <img src="https://mintcdn.com/orderprotectioncom/jzsZz1L0F1t7QLbE/public/assets/img/woo/woocommerce-plugins.png?fit=max&auto=format&n=jzsZz1L0F1t7QLbE&q=85&s=1a4be01665a31292329409abff866cfb" alt="woo-plugin" width="708" height="88" data-path="public/assets/img/woo/woocommerce-plugins.png" />
  </Step>

  <Step title="Add Webhook">
    Go back to your settings tab in your OrderProtection dashboard and click on the `Webhooks` tab.

    <img src="https://mintcdn.com/orderprotectioncom/jzsZz1L0F1t7QLbE/public/assets/img/woo/woo-webhooks.png?fit=max&auto=format&n=jzsZz1L0F1t7QLbE&q=85&s=1d9515d00bd0ed60cab412373ebffb37" alt="webhooks-view" width="1160" height="501" data-path="public/assets/img/woo/woo-webhooks.png" />

    Click on the `Create Webhook` button and add the following details:

    **Payload URL**:

    This is the URL for your store, but you will need to append 1 of the following. If your REST endpoints are available through your Wordpress configuration
    you can do

    ```
    ${YOUR_STORE_URL}/wp-json/order-protection/v1/claim-resolution
    ```

    If they are not publicly available or you do not have your redirects setup you can do the following:

    ```
    ${YOUR_STORE_URL}/index.php?rest_route=/order-protection/v1/claim-resolution
    ```

    **Webhook Secret**

    You will need to create a secure secret to make sure that OrderProtection is the one sending the Claim Resolution payload.
    You can use any value but if you'd like to generate a unique and secure value you can use:

    ```bash theme={null}
    openssl rand -hex 24
    ```

    Keep this webhook secret safe.

    **Events** Click on `Let me select individual events`

    Choose the following:

    * `Claims -> Approved`

    You only need this one event for the OrderProtection Plugin to work correctly.

    Click `Create`

    It should look something like this:

    <img src="https://mintcdn.com/orderprotectioncom/YH-3ZcWwdyNXknOd/public/assets/img/woo/woo-webhook-event-selections.png?fit=max&auto=format&n=YH-3ZcWwdyNXknOd&q=85&s=43e3c983c3bdeac3d9107fa8ba9a9501" alt="webhook-select-events" width="1000" height="2936" data-path="public/assets/img/woo/woo-webhook-event-selections.png" />
  </Step>

  <Step title="Add OrderProtection credentials">
    In your WooCommerce settings you will now see an OrderProtection tab. In this tab you'll need to enter your store URL. This should match
    what was given to you from the OrderProtection team.

    You will also add in API Key that you generated in the previous steps.

    <img src="https://mintcdn.com/orderprotectioncom/jzsZz1L0F1t7QLbE/public/assets/img/woo/woocommerce-settings.png?fit=max&auto=format&n=jzsZz1L0F1t7QLbE&q=85&s=557a8823b7229a0d178cd21edb982438" alt="woo-settings" width="1224" height="672" data-path="public/assets/img/woo/woocommerce-settings.png" />

    You will also need to add in your Webhook Secret from the previous step.
  </Step>
</Steps>
