# Carrier connections

Connect the delivery companies you ship with, either entered by hand or through the carrier's own system, so Shipping services can rate, book and track parcels.

Source: https://support.rework.com/article/commerce-carrier-connections

> **In plain words:** A **carrier** is a delivery company, such as GHN or DHL. A **carrier connection** stores how Commerce talks to one of them. A **manual** connection is just a name, and you type tracking numbers and costs yourself. A **provider integration** links to the carrier's system, so Commerce can quote prices, book pickups, print labels and follow tracking for you. New to the terms used here? See [Commerce basics](https://support.rework.com/article/commerce-basics).

**Where to find it:** Commerce > left icon rail > **Settings** > **Accounts & integrations** > **Carrier connections**. You can also reach the same page from the **Shipping** icon > **Carriers**. **Who can use it:** workspace admins.

## Before you start

- Create a Shipping service in **Settings** > **Services**. See [Services](https://support.rework.com/article/commerce-services).
  
- For a provider integration, have the carrier account ready: its API token and, for some carriers, a shop ID and pickup address.
  

## Choose manual or integration

| 
Kind

 | 

You do

 | 

Commerce does

 |
| --- | --- | --- |
| 

**Manual** ("You record carrier, tracking and cost yourself.")

 | 

Type carrier, tracking and cost on each shipment

 | 

Stores them. Nothing is sent to the carrier

 |
| 

**Provider integrations** ("Rates, labels and tracking come from the carrier.")

 | 

Enter the carrier credentials once

 | 

Rates, books, prints labels and tracks

 |

## Add a connection

1. Click **Settings**, then **Carrier connections**. The header shows the count and the mode, **Live environment** or **Sandbox environment**.
   
2. Click **New connection**. A dialog opens: "Choose a carrier."
   
3. Pick **Manual carrier**, or one of the provider integrations: **GHN (Giao Hàng Nhanh)**, **GHTK (Giao Hàng Tiết Kiệm)** (Vietnam domestic parcels) or **EasyPost** (one key for 100+ global carriers).
   
4. Enter **Name** (required). Then fill the provider fields, described below.
   
5. In **Owners**, add non-admin users who may manage the connection.
   
6. Click **Create connection**.
   

![The New carrier connection dialog with the Manual carrier choice and the Provider integrations GHN, GHTK and EasyPost](https://storage.googleapis.com/reworkv3-public/success/261012/l2lIT1Dk3VOc4Ghn6SIGGvPtwG0ccXmsFtTO5xLVeXNxmfPMePvuKoIr6dC8W6Ih/img.mXe72pd97qwfgL1rrhDJZCnJvZ2zcSCPYYP8d707ds9aRfCaziixdYMmWBp33TMY.png)

### GHN

- **API token** (required), from your GHN account.
  
- **Shop ID** (required). One connection ships as exactly one GHN shop.
  
- **Pickup origin** (required), the warehouse GHN collects from.
  
- **Fee payer**: **Sender pays (shop)** or **Recipient pays**.
  
- **Inspection policy**: **No inspection**, **Inspect, no trial** or **Inspect and trial**.
  

GHN accepts amounts in Vietnamese dong only, and each parcel side up to 200 cm and weight up to 30 kg.

### GHTK

- **API token** (required).
  
- **Client source (partner code)** (required), from the GHTK dashboard under its API settings.
  
- **Pickup origin** (required), and an optional **Pickup warehouse ID** that takes priority when set.
  
- **Default transport**: **Road** or **Air**.
  
- **Recipient pays shipping**: either the sender pays shipping or the recipient pays only the cash on delivery.
  

### EasyPost

- **API key** (required). Optionally a **Webhook HMAC secret**.
  
- **Default from address**, recommended. Without it every shipment must carry its own from-address.
  
- **Carrier accounts**: click **Load from provider** to list the carriers on your EasyPost account and tick the ones to use. Leave it empty to rate against all of them. The cheapest is chosen when you ask for rates.
  

## Read the table

| 
Column

 | 

What it shows

 |
| --- | --- |
| 

**Instrument**

 | 

Name and provider

 |
| 

**Kind**

 | 

**Manual** or **Integration**

 |
| 

**Credentials**

 | 

Stored key names, or **Missing**

 |
| 

**Status**

 | 

**Enabled** or **Disabled**

 |

Row icons:

- **Edit** the settings.
  
- **Test** the connection. You see **Connection OK** when it works.
  
- **Rotate token** issues a new internal token after a confirmation.
  
- **Set up webhook** (for carriers that push updates) opens a dialog with **Issue URL**. Copy the **Callback URL** into the carrier's webhook settings. It is shown once. **Rotate URL** replaces it and the old one stops working; **Revoke** turns it off.
  
- **Disable** or **Enable**, and delete (detach it from Shipping services first).
  

## Attach a connection to a Shipping service

1. Go to **Settings** > **Services** and open your Shipping service.
   
2. Open **Execution**. Under **Carrier connections**, tick the connections this service may use.
   
3. Optionally tick **Allow manual execution**, then click **Save execution settings**.
   
4. Open **Origins**, click **Add origin** to name a ship-from place, mark one as **Default**, then click **Save origins**.
   

Then shipments created under that service use the connection. See [Shipping](https://support.rework.com/article/commerce-shipping).

## Troubleshooting

| 
Problem

 | 

Why it happens

 | 

What to do

 |
| --- | --- | --- |
| 

**Credentials** shows **Missing**

 | 

No token was saved

 | 

Edit and enter the API token

 |
| 

Test fails

 | 

Wrong token, shop ID or partner code

 | 

Re-check the values in the carrier dashboard, then **Test** again

 |
| 

Rates are refused

 | 

A GHN connection needs dong and a full pickup address

 | 

Check the pickup origin and the currency

 |
| 

"Enter the provider credential above to load the list."

 | 

You pressed **Load from provider** before typing the key

 | 

Enter the **API key** first

 |
| 

Tracking does not update

 | 

The callback URL was not pasted, or the HMAC secret is missing

 | 

Use **Set up webhook** and paste the URL, add the secret if the carrier signs callbacks

 |
