In order to use FedEx, you'll need to ensure you are using a valid United States address as your origin. You'll also need to ensure your Craft Commerce default currency is set to USD.
To use Fedex API, you'll need to:
After this, you should receive an email with the following information, that is required by Postie:
accountNumbermeterNumberkeypasswordThe below service are available with FedEx for domestic and international customer destination addresses.
Domestic
FEDEX_1_DAY_FREIGHTFEDEX_2_DAYFEDEX_2_DAY_AMFEDEX_2_DAY_FREIGHTFEDEX_3_DAY_FREIGHTFEDEX_EXPRESS_SAVERFEDEX_FIRST_FREIGHTFEDEX_FREIGHT_ECONOMYFEDEX_FREIGHT_PRIORITYFEDEX_GROUNDFIRST_OVERNIGHTPRIORITY_OVERNIGHTSTANDARD_OVERNIGHTGROUND_HOME_DELIVERYSMART_POSTInternational
INTERNATIONAL_ECONOMYINTERNATIONAL_ECONOMY_FREIGHTINTERNATIONAL_FIRSTINTERNATIONAL_PRIORITYINTERNATIONAL_PRIORITY_FREIGHTEUROPE_FIRST_INTERNATIONAL_PRIORITY
Add the following code to your configuration file under the providers array, as per the below. Note that to disable certain services, simply omit them from the services array.
'providers' => [
'fedEx' => [
'name' => 'FedEx',
'markUpRate' => '<yourMarkUpRate>',
'markUpBase' => '<value>',
'settings' => [
'accountNumber' => '<yourAccountNumber>',
'meterNumber' => '<yourMeterNumber>',
'key' => '<yourKey>',
'password' => '<yourPassword>',
// Whether to use the test API endpoint (optional)
'useTestEndpoint' => false,
],
'services' => [
'FEDEX_EXPRESS_SAVER' => 'Express Saver',
'FEDEX_GROUND' => 'Ground',
'INTERNATIONAL_ECONOMY' => 'International Economy',
'INTERNATIONAL_PRIORITY' => 'International Priority',
'PRIORITY_OVERNIGHT' => 'Priority Overnight',
'STANDARD_OVERNIGHT' => 'Standard Overnight',
],
],
]