Getting Started With Magento 2.x (CE and EE)
Plans: All plans Platforms: Magento 2
AfterShip integrates with both Magento 2 CE and Magento 2 EE. This guide covers all steps required to integrate AfterShip Tracking with Magento 2 stores and sync your store’s order information and customer data to AfterShip Tracking admin.
If installing the integration for the first time, please follow the installation instructions for your Magento 2 version.
Directly create integration from your Magento store admin
Install with Composer (2.4+)
Install with Web Setup Wizard (2.3- & Older)
This method is ideal for non-technical users or when server-level access is restricted.
If your Magento system has multiple stores that need to be connected, you must create multiple integrations.
Log in to your Magento 2 admin panel.
Go to System > Integrations > Add new integration.

Fill in the required integration information.

Set the Callback URL:
https://accounts.aftership.com/oauth/magento-2/callback?store_id=1
You need to modify the "store_id" parameter in the callback URL above with your Magento store ID. The store ID is a numeric value starting from 1.
Find it under: Stores > All Stores > Choose the store > click the [store view] column

Set the Identity URL:
https://accounts.aftership.com/oauth/magento-2/identity
Under API, set Resources Access to All, then click Save.

Find the integration you created on the list, then click Active and Allow the API permissions.


Log in to your AfterShip account which is opened on the new window, then choose the organization (ORG) you want to link and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.


Verify the connection under AfterShip Tracking Admin > Apps > Magento 2.
Please make sure you selected the correct organization that your store was connected.

This is suitable for advanced users with SSH access.
Installation via Composer requires an IT administrator with SSH access to the server where Magento 2 is hosted.
To install the AfterShip extension, you’ll need to execute the following steps:
Log into your Magento 2 server.
Navigate to the Magento root directory from your command-line tool.
This guide shows example outputs for Terminal, but these steps can be modified for any command-line tool you choose.
Run the following command to access the latest version of the Magento extension from Packagist.
Enter your authentication key, which is created for your developer account.
Your public key is your username, and your private key is your password. ( Get your authentication keys)

Enable the AfterShip extension you just downloaded:
Run the following command to enable additional modules.
To ensure that the CSS and JS on your Magento 2 store continue to work properly, you’ll need to run the following static content deploy command.
After the installation, log in and navigate to the Magento 2 store admin page.
Go to System > Integrations, find the integration, and activate it.

Find the store you want to connect to in the Integrations list, click Activate and on the pop-up page, select Allow.
Please make sure your API permissions is set to All.


Log in to your AfterShip account in the new window, select your ORG you want to link and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.


Confirm the integration under AfterShip Tracking > Apps > Magento 2.

This is best for users managing older Magento versions via admin UI.
Log in to your Magento 2 store admin> System > Tools > Web Setup Wizard.

Click Extension Manager.

Sign in and sync your Magento Marketplace account.
Locate the AfterShip extension under the name aftership/aftership-apps-magento2.
Under the Actions menu, click Install.
After installation, navigate to System > Integrations.

Find the store you want to connect to in the Integrations list, click Activate and on the pop-up page, and select Allow.
Please make sure your API permissions are set to All.


Log in to your AfterShip account in the new window, choose the ORG you want to link, and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.


Verify the connection on AfterShip Tracking > Apps > Magento.
Automated Tracking Notifications: Once integrated, AfterShip can notify customers with real-time tracking updates.
Centralized Shipment Management: Manage all order shipments from one dashboard, reducing manual tracking efforts.
Customer Support Optimization: Enable your support team to quickly access tracking statuses directly from AfterShip.
Scalable Multi-Store Setup: Configure and manage multiple Magento stores by creating individual integrations for each one.
A 403 error indicates that AfterShip's request has been blocked by your Cloudflare settings. To resolve this:
Follow the bypass setup instructions provided in the below image.

Alternatively, add 54.208.44.50 to your whitelist.
Log in to your Magento 2 Admin.
Go to System > Integrations.
Choose the store you want to connect and click Edit.
Set API permissions to All.
Click Save and reconnect to AfterShip.

To remove the store connection from another organization:
Log in to the AfterShip account associated with that store.
Switch to the relevant organization (ORG).
Go to Integration > Apps > Magento 2.

Click Delete to remove the existing store connection.

We discussed three integration methods cater to different user roles, technical and non-technical.
Callback and Identity URLs are essential for OAuth-based integration.
API permissions must be set to All for successful communication with AfterShip.
Multiple Magento stores require separate integrations.
Integration status can be verified within the AfterShip admin under Tracking > APPs > Magento2.
API Permissions: Authorization levels assigned to the integration for data access.
Callback URL: The endpoint AfterShip uses to receive authorization codes after successful login.
Composer: A dependency manager for PHP used for Magento 2 module installation.
Packagist: Packagist is a repository for PHP code libraries that allows you to easily install the latest version of the plugin.
SSH (Secure Shell): A secure protocol to access remote servers.
Web Setup Wizard: Magento’s built-in interface to manage extensions for older versions.
General CLI installation
How To Install/Uninstall Magento 2 Extensions
How to Install Magento 2 Extensions Using the Web Setup Wizard
Install the Klaviyo Extension in Magento 2
Overview
AfterShip integrates with both Magento 2 CE and Magento 2 EE. This guide covers all steps required to integrate AfterShip Tracking with Magento 2 stores and sync your store’s order information and customer data to AfterShip Tracking admin.
If installing the integration for the first time, please follow the installation instructions for your Magento 2 version.
What you'll learn
Directly create integration from your Magento store admin
Install with Composer (2.4+)
Install with Web Setup Wizard (2.3- & Older)
1. Directly create integration from your Magento store admin
This method is ideal for non-technical users or when server-level access is restricted.
If your Magento system has multiple stores that need to be connected, you must create multiple integrations.
Log in to your Magento 2 admin panel.
Go to System > Integrations > Add new integration.
Fill in the required integration information.
Set the Callback URL:
https://accounts.aftership.com/oauth/magento-2/callback?store_id=1
You need to modify the "store_id" parameter in the callback URL above with your Magento store ID. The store ID is a numeric value starting from 1.
Find it under: Stores > All Stores > Choose the store > click the [store view] column
Set the Identity URL:
https://accounts.aftership.com/oauth/magento-2/identity
Under API, set Resources Access to All, then click Save.
Find the integration you created on the list, then click Active and Allow the API permissions.
Log in to your AfterShip account which is opened on the new window, then choose the organization (ORG) you want to link and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.
Verify the connection under AfterShip Tracking Admin > Apps > Magento 2.
Please make sure you selected the correct organization that your store was connected.
2. Install with Composer (Magento 2.4+)
This is suitable for advanced users with SSH access.
Installation via Composer requires an IT administrator with SSH access to the server where Magento 2 is hosted.
To install the AfterShip extension, you’ll need to execute the following steps:
Log into your Magento 2 server.
Navigate to the Magento root directory from your command-line tool.
This guide shows example outputs for Terminal, but these steps can be modified for any command-line tool you choose.
Run the following command to access the latest version of the Magento extension from Packagist.
composer require aftership/aftership-apps-magento2
Enter your authentication key, which is created for your developer account.
Your public key is your username, and your private key is your password. ( Get your authentication keys)

Enable the AfterShip extension you just downloaded:
bin/magento module:enable AfterShip_Tracking --clear-static-content
Run the following command to enable additional modules.
bin/magento setup:upgrade
To ensure that the CSS and JS on your Magento 2 store continue to work properly, you’ll need to run the following static content deploy command.
php bin/magento setup:static-content:deploy -f
After the installation, log in and navigate to the Magento 2 store admin page.
Go to System > Integrations, find the integration, and activate it.
Find the store you want to connect to in the Integrations list, click Activate and on the pop-up page, select Allow.
Please make sure your API permissions is set to All.
Log in to your AfterShip account in the new window, select your ORG you want to link and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.
Confirm the integration under AfterShip Tracking > Apps > Magento 2.
3. Install with Web Setup Wizard (Magento 2.3 & Older)
This is best for users managing older Magento versions via admin UI.
Log in to your Magento 2 store admin> System > Tools > Web Setup Wizard.
Click Extension Manager.
Sign in and sync your Magento Marketplace account.
Locate the AfterShip extension under the name aftership/aftership-apps-magento2.
Under the Actions menu, click Install.
After installation, navigate to System > Integrations.
Find the store you want to connect to in the Integrations list, click Activate and on the pop-up page, and select Allow.
Please make sure your API permissions are set to All.
Log in to your AfterShip account in the new window, choose the ORG you want to link, and click Connect. Wait a few seconds, and it will automatically close, indicating a successful connection.
Verify the connection on AfterShip Tracking > Apps > Magento.
Use cases
Automated Tracking Notifications: Once integrated, AfterShip can notify customers with real-time tracking updates.
Centralized Shipment Management: Manage all order shipments from one dashboard, reducing manual tracking efforts.
Customer Support Optimization: Enable your support team to quickly access tracking statuses directly from AfterShip.
Scalable Multi-Store Setup: Configure and manage multiple Magento stores by creating individual integrations for each one.
FAQs
Q1. How do I resolve a 403 Forbidden error?
A 403 error indicates that AfterShip's request has been blocked by your Cloudflare settings. To resolve this:
Follow the bypass setup instructions provided in the below image.
Alternatively, add 54.208.44.50 to your whitelist.
Q2. How do I fix a "Lack of permission" error?
Log in to your Magento 2 Admin.
Go to System > Integrations.
Choose the store you want to connect and click Edit.
Set API permissions to All.
Click Save and reconnect to AfterShip.
Q3. How can I delete a store connection that's occupied by another organization?
To remove the store connection from another organization:
Log in to the AfterShip account associated with that store.
Switch to the relevant organization (ORG).
Go to Integration > Apps > Magento 2.
Click Delete to remove the existing store connection.
Key takeaways
We discussed three integration methods cater to different user roles, technical and non-technical.
Callback and Identity URLs are essential for OAuth-based integration.
API permissions must be set to All for successful communication with AfterShip.
Multiple Magento stores require separate integrations.
Integration status can be verified within the AfterShip admin under Tracking > APPs > Magento2.
Appendix
API Permissions: Authorization levels assigned to the integration for data access.
Callback URL: The endpoint AfterShip uses to receive authorization codes after successful login.
Composer: A dependency manager for PHP used for Magento 2 module installation.
Packagist: Packagist is a repository for PHP code libraries that allows you to easily install the latest version of the plugin.
SSH (Secure Shell): A secure protocol to access remote servers.
Web Setup Wizard: Magento’s built-in interface to manage extensions for older versions.
References
General CLI installation
How To Install/Uninstall Magento 2 Extensions
How to Install Magento 2 Extensions Using the Web Setup Wizard
Install the Klaviyo Extension in Magento 2
Updated on: 09/05/2025
Thank you!