Skip to main content

Canada Post

Canada Post is a Canadian shipping carrier integration that retrieves real-time shipping rate quotes for orders during checkout and order processing. Stores shipping from or within Canada use this integration to offer accurate Canada Post shipping costs to customers based on package weight, dimensions, and destination.

How to set it up

Where to find it: Admin → Shipping → Canada Post

When you'd use this: When your store ships from Canada and you want to offer Canada Post shipping options with live rates at checkout.

What you need first:

  • A Canada Post account with API access
  • Your Canada Post API key (username)
  • Your API secret (password)
  • Your customer number (optional, for commercial accounts)
  • Your contract ID (optional, if you have a commercial contract with negotiated rates)

Set it up:

  1. Navigate to Admin → Shipping → Canada Post.
  2. Enter your API Key in the apiKey field.
  3. Enter your API Secret in the apiSecret field.
  4. If you have a commercial account, enter your Customer Number.
  5. If you have a contract with negotiated rates, enter your Contract ID.
  6. Save the configuration.
  7. The integration will connect to https://ct.soa-gw.canadapost.ca using basic authentication.

Configuration options

FieldWhat it doesDefaultRequired
apiKeyYour Canada Post API username credential for authenticationNoneYes
apiSecretYour Canada Post API password credential for authenticationNoneYes
customerNumberYour Canada Post commercial customer number; when provided, returns commercial rates instead of counter ratesNoneNo
contractIdYour Canada Post contract identifier for accessing negotiated rates under your commercial agreementNoneNo

Using it day-to-day

  1. When a customer reaches checkout, Canada Post rates are automatically requested based on the cart's weight, dimensions, origin postal code, and destination.
  2. The integration sends package weight in kilograms (converted from grams) and dimensions in centimeters (converted from millimeters, rounded up).
  3. For Canadian destinations, the postal code is used; for US destinations, the ZIP code is used; for international destinations, the country code is used.
  4. Canada Post returns available service options with pricing in CAD.
  5. The customer sees service names, costs, and expected transit times as shipping options.
  6. If no customer number is provided, the integration requests counter (retail) rates using <quote-type>counter</quote-type>.
  7. If a customer number is provided, the integration requests commercial rates using your account credentials.

Troubleshooting

  • No rates returned at checkout: Verify that your origin postal code is configured in your warehouse settings and that the shipment has a valid weight and destination postal code. Canada Post requires postal codes without spaces for Canadian addresses.
  • Authentication errors: Double-check that your apiKey and apiSecret are correct and that your Canada Post API account is active.
  • Missing contracted rates: Ensure your contractId is entered correctly if you expect to see negotiated pricing. Without a contract ID, you'll only see standard commercial rates (with customer number) or counter rates (without).
  • Incorrect weight or dimension errors: Canada Post expects weight in kilograms with three decimal places and dimensions in whole centimeters. The integration automatically converts from grams and millimeters.
  • Wrong environment (test vs production): The integration uses the production Canada Post gateway at https://ct.soa-gw.canadapost.ca. Ensure your API credentials match the production environment.