Pre-Requisites
- You must be a customer of OrderProtection. If you are not a customer of OrderProtection but would like to be please reach out to Onboarding
- You must have access to your OrderProtection dashboard at https://app.orderprotection.com
Installing the Plugin
You can download the Magento module zip file Here To install the plugin please follow the README.md which will be included in the directory. After Magento Installation Before you edit the plugin settings we need to generate a few items from your OrderProtection dashboard. Login here Once signed in, you must make sure that the store you would like to install the plugin on is selected from the store dropdown.
Generating your API Token
You must generate an API token which will be used to authenticate your store with OrderProtection’s API. This is a sensitive key as it will allow you to send order information into OrderProtection. Please store this in a safe place. Click on the settings navigation item in the left sidebar.

Create API Token
button. You can name this anything that you’d like. We use the
name to attribute actions to a specific key. If your API key were to be compromised you’d be able to know exactly which
key to remove.

Create
make sure to save the value shown. You will not be able to see this value again!

Creating a Webhook
In order for OrderProtection to be able to create replacement orders and refund customers we need to create a webhook. This webhook will send a request to your OrderProtection Magento plugin informing the plugin which items to reship or refund. You’ll need to know your hosted sites location e.g (https://orderprotection.com) Go back to your settings tab in your OrderProtection dashboard and click on theWebhooks
tab.

Create Webhook
button and add the following details:
Payload URL:
System
-> Integration
and create a new Integration.
You can call this Integration Order Protection
. Once you have this integration you need to click on the Edit (pencil)
button. This will show you the integration settings.
You need to find the Access Token
field.
Your webhook secret will match the following format:
${AccessToken}
Input this into your OrderProtection webhook secret field.
Events Click on Let me select individual events
Choose the following:
Claims -> Approved
Claims -> Created
Create
It should look something like this:


Finalizing Plugin Settings
Once you have your API token and Webhook secret, navigate to your admin page of your store. You will need to find the Order Protection section You can find this section by navigating to Stores -> Configuration -> Sales -> Order Protection