In order to use Canada Post, you'll need to ensure you are using a valid Canadian address as your store location. You'll also need to ensure your Craft Commerce default currency is set to CAD.
Register for API credentials via the Canada Post Developers Centre form.
The below service are available with Canada Post for domestic and international customer destination addresses.
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
'providers' => [ 'canadaPost' => [ 'name' => 'Canada Post', 'settings' => [ 'customerNumber' => 'xxxxxxxxxxxxx', 'username' => 'xxxxxxxxxxxxxxxxxxxxx', 'password' => 'xxxxxxxxxxxxxxxxxxxxx', ], 'services' => [ 'DOM_EP' => 'Expedited Parcel', 'DOM_RP' => 'Regular Parcel', 'DOM_PC' => 'Priority', 'INT_PW_ENV' => 'Priority Worldwide envelope INTL', 'USA_PW_ENV' => 'Priority Worldwide envelope USA', ], ], ]
Available for Craft 3. Get it from the plugin store.