Help Center
Magento
Integration Guide

Magento 2 + ShipGrid

Pull orders from your Magento 2 store into ShipGrid, buy discounted shipping labels, and push tracking numbers back — with a rich tracking panel right inside your Magento admin.

How it works

The integration has two parts: a Magento 2 extension that adds tracking display and webhook processing to your store, and an OAuth connection from your ShipGrid dashboard that syncs orders and writes back tracking data automatically.

1

New orders appear in Magento

Customer places an order on your store

2

Orders sync to ShipGrid

Auto-imported with customer info, items, weights

3

Buy label, tracking goes back

Tracking number + carrier + progress written to Magento order

Installation

Step 1 — Install the Magento extension

Download the shipgrid-for-magento.zip file from the sidebar (or the button below). Extract it to your Magento installation:

Option A: Copy to app/code (recommended)

# Extract and copy to your Magento root unzip shipgrid-for-magento.zip cp -r ShipGrid-shipping/ <magento-root>/app/code/ShipGrid/Shipping/ # Enable the module cd <magento-root> php bin/magento module:enable ShipGrid_Shipping php bin/magento setup:upgrade php bin/magento cache:flush

After running setup:upgrade, the module creates the shipgrid_tracking table and registers webhook routes automatically.

Step 2 — Connect via OAuth Integration

In your Magento admin, go to System → Integrations and click Add New Integration. Fill in the following:

NameShipGrid
Callback URL
https://shipgrid.ai/api/channels/magento/callback
Identity Link
https://shipgrid.ai/api/channels/magento/identity
New Integration form in Magento admin with Callback URL and Identity Link URL filled in

Fill in the Name, Callback URL, and Identity Link URL. The Email field is optional.

Step 3 — Set API permissions

Click the API tab on the left. Under "Resource Access", either select All or grant access to these specific resources:

  • Sales — Orders, invoices, shipments, credit memos
  • Catalog — Products (for weights & dimensions)
  • Stores — Store configuration & views

Tip: "All" is the simplest option and ensures all sync features work. You can restrict it later if needed.

Step 4 — Save and Activate

Click Save to create the Integration. Then find it in the list and click the Activate link. Magento will ask you to confirm — click Allow.

Magento Integrations list showing Activate link for ShipGrid

Click the Activate link next to the ShipGrid integration to start the OAuth handshake.

Important: Make sure you're logged into your ShipGrid account in the same browser before clicking Activate. Magento redirects your browser to ShipGrid's Identity Link URL, and ShipGrid needs your session to associate the store with your account.

Step 5 — Configure the extension

Go to Stores → Configuration → Sales → ShipGrid and enter your webhook secret (found on your ShipGrid Channels page). Configure notification and auto-complete preferences.

Magento admin Integrations page showing ShipGrid with Active status

The ShipGrid integration appears as Active in Magento's System → Integrations list.

Extension settings

All settings live under Stores → Configuration → Sales → ShipGrid. Here's what each option does:

General

  • Enable — Master switch for the extension. When disabled, webhooks are ignored and tracking panels are hidden.
  • Webhook Secret — HMAC-SHA256 secret for verifying incoming webhooks from shipgrid. Copy this from your ShipGrid Channels page.
  • Debug Logging — Writes detailed logs to var/log/shipgrid.log. Keep off in production.

Tracking

  • Auto Complete on Delivery — Automatically marks orders as "Complete" when carrier tracking confirms delivery.
  • Notify Customer on Ship — Sends a shipment notification email with tracking link when a label is purchased.
  • Notify Customer on Delivery — Sends a delivery confirmation email when the package is delivered.

What gets synced

Magento → ShipGrid

  • Order number, date, total
  • Billing & shipping addresses
  • Line items with SKU, quantity, weight
  • Customer name & email
  • Order status & payment info

ShipGrid → Magento

  • Tracking number & carrier + service name
  • Visual progress stepper (Label Created → Picked Up → In Transit → Delivered)
  • Full tracking timeline with events & locations
  • Label cost & label PDF link
  • Shipment creation on the order
  • Order status updates (→ Complete)
  • Delivery & exception notifications

Tracking data is stored in the shipgrid_tracking table and displayed in a rich tracking panel on both admin order view and shipment view pages — no additional tracking extension required.

Order tracking panel

When a label is purchased in ShipGrid, the extension adds a rich ShipGrid Tracking panel to both the admin order detail page and the shipment detail page. Customers also see tracking progress on their My Account order view.

ShipGrid Tracking panel in Magento admin order view

Carrier & service

Shows the real carrier logo, name, and service level (Ground, Priority, Express).

Progress stepper

Visual 4-step indicator: Label Created → Picked Up → In Transit → Delivered. Updates automatically as tracking status changes.

Tracking timeline

Collapsible event-by-event timeline with timestamps and locations, ordered newest-first.

Quick actions

Track on ShipGrid tracking page, view on carrier's official site, label cost display (admin only).

The tracking number links to the ShipGrid tracking page for a detailed view. Tracking data is pushed via webhook in real time.

Webhook events

The extension receives webhook events from ShipGrid at /shipgrid/webhook/receive. All requests are verified with HMAC-SHA256 signature using your webhook secret.

EventAction
label.createdSaves tracking record, adds admin order comment
label.purchasedSaves tracking, moves order to Processing, notifies customer
label.voidedMarks tracking as voided, adds admin comment
tracking.updatedUpdates status, events timeline, adds customer-visible comment
tracking.deliveredMarks delivered, auto-completes order (if enabled), notifies customer
tracking.exceptionLogs warning, adds admin-only alert comment

Alternative: Manual token entry

If you've already created an Integration and have the 4 API tokens (Consumer Key, Consumer Secret, Access Token, Access Token Secret), you can enter them directly:

  1. Go to ShipGrid → Channels → Add Channel → Magento
  2. Switch to the Manual Tokens tab
  3. Enter your store URL and all 4 tokens
  4. Click Connect

This is useful if your Magento store can't reach the internet (e.g., staging environments behind a firewall) or if you prefer to manage tokens manually.

Disconnecting

You can disconnect from either side:

  • From ShipGrid: Go to Channels, find your Magento store, and click Disconnect.
  • From Magento: Go to System → Integrations, find "ShipGrid", and click Delete or Reset.

Disconnecting does not delete any orders, shipments, or tracking data already in your store. It only stops future sync. The extension can be uninstalled separately via module:disable ShipGrid_Shipping.

Troubleshooting

"State not found or expired" error

The OAuth handshake must complete within 10 minutes. If you took too long between Save and Activate, delete the Integration in Magento and create a new one.

Redirect goes to login page

You need to be logged into ShipGrid in the same browser before clicking Activate in Magento. Log in to ShipGrid first, then try Activate again (you may need to recreate the Integration).

Tracking panel not showing

Make sure the extension is enabled (php bin/magento module:status | grep ShipGrid) and the "Enable" setting is set to Yes in Stores → Configuration → Sales → ShipGrid. Run cache:flush after any config changes.

Webhook events not received

Verify the webhook secret matches between ShipGrid and your Magento config. Checkvar/log/shipgrid.log (enable Debug Logging) for signature verification failures. Your store must be accessible from the internet.

Orders not importing

Verify the store shows as "Active" on your Channels page. Check that the Integration has the required API permissions (Sales, Catalog, Stores). Order sync runs on a schedule — newly placed orders may take a few minutes to appear.

Requirements

  • Magento 2.4+ (Open Source or Commerce)
  • PHP 8.1+
  • REST API enabled (default)
  • HTTPS required
  • Admin access to create Integrations and install extensions
Download Extension
Magento 2 extension for tracking display and webhook processing. Extract to app/code/ShipGrid/Shipping/.
shipgrid-for-magento.zipInstallation Guide (PDF)

v1.0.1 · Magento 2.4+ · PHP 8.1+

Quick Setup URLs
Copy these into your Magento Integration settings.

Callback URL

https://shipgrid.ai/api/channels/magento/callback

Identity Link URL

https://shipgrid.ai/api/channels/magento/identity
At a glance
Extension version1.0.1
Auth methodOAuth 1.0a
Magento version2.4+
Webhook security
HMAC-SHA256
Ready to connect?
Install the extension, create an Integration, then activate it.