# Installation

First of all you need an FedEx account and create API credentials. After that you can install and configure the extension and the shipping methods in your shop.

When implementing our extension you should start with a FedEx test account. The following guide descripes the process of getting a test account.

### Get API credentials

To communicate with FedEx APIs in both production and test environments, developer registration is required. Follow these steps to proceed:

1. Register for a free account at [**FedEx Developer Portal**](https://developer.fedex.com/) or login into your existing account..
2. Navigate to **My Projects** and click **Create Project** button to register your new project.\ <img src="/files/blcZruwFotFzf7esQzxq" alt="" data-size="original">
3. Enter a name for your new project and click **Next** button.
4. Select your products you want to use in your project. For FedEx plugin you need:
   1. Account Registration API
   2. Rates and Tansit Times API
5. Go ahead by clicking **Next** button.
6. Accept the terms and create your new project.
7. Copy the API Key and Secret Key. You will need them in the extension.\
   ![](/files/sRW3PrR2iJke1Sgpw7ry)

{% hint style="info" %}
If you are an integrator and want to use the "Test FedEx Integrator Account": Contact FedEx support for test account numbers. You will need them to connect the Shopware extension with the FedEx API.
{% endhint %}

### Install & configure extension

After you have your API Key, Secret Key and test account numbers, switch to the Shopware admin and install the extension via **Extensions** > **My Extensions**.

<figure><img src="/files/4nNPHAU5FmLoTMYWiZ3J" alt=""><figcaption></figcaption></figure>

Before you enable the extension, check the settings in this section and ensure they meet your requirements. Make any changes to individual fields as described below by selecting **My extensions** > **FedEx Shipping Rates** > **Configure**.

#### General properties

In this area you can configure some base settings

| Field                                               | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| --------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unit of weight                                      | Dropdown | Please select which unit of weights you use for your products in shop                                                                                                                                                                                                                                                                                                                                                                                               |
| Package type                                        | Dropdown | If you use the default **Your packaging** then the shipping costs are calculated by sender and receiver address and the weight of the shopping cart. But you can also use a branded FedEx box and choose one of the pre-defined box sizes of FedEx. Please ensure that you buy the right FedEx box sizes and that your products don't exceed the maximum weights you can finde here: <https://developer.fedex.com/api/en-us/guides/api-reference.html#packagetypes> |
| Enable Caching                                      | Toggle   | Normally API request are cached. Disable for testing purposes.                                                                                                                                                                                                                                                                                                                                                                                                      |
| Show message why a shipping method is not available | Toggle   | Display a hint why FedEx shipping methods are not available. It only shows a message on an error. For instance: Missing weight of products or invalid format of address.                                                                                                                                                                                                                                                                                            |
| Log Level                                           | Dropdown | Select whether only errors should be recorded in a log file or also debug information.                                                                                                                                                                                                                                                                                                                                                                              |
| Show exceptions on storefront                       | Toggle   | Enable this settings to show some exceptions directly in storefront. This should only be  be used for testing purposes and not in a live shop.                                                                                                                                                                                                                                                                                                                      |

#### Connect with FedEx API

After you have finished the general properties configuration, switch to **Settings > Extensions > FedEx** and follow this guide to connect your shop with FedEx API in three step&#x73;**.**

1. Choose the mode you want to use. If you are installing the extension the first time, then choose **Test**. When you've already finished all tests and got live credentials from FedEd then  then choose **Live**. \
   Enter your **API Key** and **API Secret** and click the **Check connection** button. Your credentials will be validated and if everthing is okay, you can go to step two.\
   ![](/files/z7E8TVqt7h6wCNPmtay5)
2. Enter your account number and your address data.\
   Please note: If your mode is **Test FedEx Integrator Account**, you will get the **Account number** and dummy address data only from FedEx support.\
   After filling the fields, please click the **Validate address** button to validate the data. If everything is okay, go ahead to final step three.
3. You need to validate your connection, by enter a **PIN** or **Invoice** data. Choose one of this methods and click **Generate PIN** or **Validate invoice** button. After validating your connection, the API connection is finally configured for your shop.

### Configure shipping methods

During installation of the extension the FedEx shipping methods were created automatically with common settings. Of course you can edit and modify the shipping methods to your needs. Follow the Shopware 6 [documentation ](https://docs.shopware.com/en/shopware-6-en/settings/shipping)for more information.

{% hint style="info" %}
Don't forgett to add the shipping methods to your sales channels where you want to use them.\
Take care: If you disable/ uninstall the FedEx plugin don't forgett to remove the shipping method from the sales channels.
{% endhint %}

### Available Shipping Methods

The following FedEx shipping methods are supported:

* FedEx First Overnight® Freight
* FedEx First Overnight®
* FedEx Priority Overnight®
* FedEx Standard Overnight®
* FedEx 2Day®
* FedEx Economy
* FedEx International Ground® and FedEx Domestic Ground®
* FedEx 1Day® Freight
* FedEx 2Day® Freight
* FedEx 3Day® Freight
* FedEx International Priority® Freight
* FedEx International Economy® Freight
* FedEx® International Deferred Freight
* FedEx International Connect Plus®
* FedEx International First®
* FedEx International Priority® Express
* FedEx International Priority®
* FedEx International Economy®
* FedEx International Priority DirectDistribution®
* FedEx International Economy DirectDistribution
* FedEx Express Saver®
* FedEx SameDay® City
* FedEx First
* FedEx Priority
* FedEx Priority Express
* FedEx Priority Express Freight
* FedEx Priority Freight
* FedEx Economy Freight
* FedEx Europe First®
* International Distribution Freight
* FedEx® Regional Economy
* FedEx® Regional Economy Freight
* FedEx Economy (Only U.K.)

{% hint style="info" %}
Not sure which shipping method is available for your country? Here you can find a complete list: <https://developer.fedex.com/api/en-us/guides/api-reference.html#servicetypes>
{% endhint %}

### Add an additional shipping fee

Additionally to the shipping rates you got from FedEx, you can also define an additional fee for your shipping methods. Just use the **Add price matrix** at a shipping method in Shopware administration. If you define a price here, it will be added to the FedEx price of the shipping method.

<figure><img src="/files/VQHIN6uE4CtLqYfb2XG8" alt=""><figcaption></figcaption></figure>

### Availability shipping rules

By extension default FedEx shipping methods are hidden if a customer is not logged in or no valid FedEx shipping methods were found for the current cart. Additionally you can define further shipping rules. For instance to enable shipping only for specific customer groups.

{% hint style="info" %}
If your FedEx shipping method is not shown after register/ login please check the following points:

* Have you sucessfully connected the extension with the FedEx API at **Settings > Extensions > FedEx**?
* Do the products in cart have a weight?
* Are your shipping rules matching the current customer?
* Did you assign your new shipping methods to your shops sales channel?
  {% endhint %}

### Error and Debug Logfile

If an error with API connection occured it is logged into a file located at folder **var/log** of Shopware base dir. In extension configuration you can also define, that debug information will be logged.

{% hint style="info" %}
Please use only real receiver shipping address for your tests. Otherwise you will get a FedEx error message like "Invalid service and packaging combination. Please update and try again".
{% endhint %}


---

# 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.premsoft.de/en/plugins/fedex/installation.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.
