Canada Post
How to get Canada Post API credentials and connect to RateTell
Canada Post Credentials
Get API credentials from Canada Post to display live Canada Post shipping rates in your checkout.
Important: Canada Post provides separate credentials for development and production environments. Your development keys will not work in production, and vice versa.
What You Need
- Canadian business address (your origin shipping location must be in Canada)
- Canada Post business account (free to create)
- No pre-existing contract required for basic rate calculation
Step-by-Step Setup
1. Create a Canada Post Account (if you don't have one)
- Go to Canada Post Business
- Click "Business" in the upper right corner
- Click "Sign Up" and complete registration
2. Join the Developer Program
- Once signed in, go to the Canada Post Developer Program
- Select "Join Now" (or "Register" depending on portal version)
- Read and accept the Terms and Conditions
3. Get Your API Credentials
After joining the Developer Program, your credentials will appear on the main Developer Program page.
You will receive two separate sets of keys:
| Environment | You'll Receive |
|---|---|
| Development (Test) | Username + Password |
| Production (Live) | Username + Password |
Important: Canada Post provides separate credentials for development and production. Your development keys will not work in production, and vice versa.
What you'll need for RateTell:
| Credential | Description |
|---|---|
| Customer Number | A 10-digit number from your Canada Post account |
| Username | Your API username (alphanumeric string) |
| Password | Your API password (alphanumeric string) |
| Contract ID | Only required if you have negotiated rate contract (leave blank for standard rates) |
Your Customer Number and Contract ID (if applicable) are displayed alongside your API keys in the Developer Program page.
Test credentials for generic testing: To test as a generic merchant without waiting for approval, you can use customer number
2004381with contract number42708517in the development environment.
4. Add to RateTell
- Log into your RateTell dashboard
- Go to Carriers in the sidebar
- Click "Connect" on the Canada Post card
- Enter credentials:
- Customer Number — Your 10-digit Canada Post customer number
- Username — From Developer Program (use development keys for testing)
- Password — From Developer Program (use development keys for testing)
- Contract ID — Leave blank unless you have negotiated rates
- Enter Origin Postal Code:
- Must be Canadian format with space (e.g.,
M5H 2N2) - Use uppercase letters
- Must be Canadian format with space (e.g.,
- Click "Test Connection"
- If successful, click "Save"
Testing Your Setup
Development (Test) Environment
Canada Post provides a separate testing environment:
- Set your environment to "Development" in RateTell carrier settings
- Use your development Username and Password
- Returns simulated rates — no impact on your production account
Production (Live) Environment
When you're ready to go live:
- Set your environment to "Production" in RateTell
- Replace credentials with your production Username and Password
- Live rates will use your actual Canada Post account
Verify Connection
Click "Test Connection" to confirm your credentials and postal code are valid.
Troubleshooting
Invalid credentials: Ensure you're using the correct environment keys (development vs. production) — they are not interchangeable. Verify there are no typos.
No rates returned: Confirm your origin postal code is a valid Canadian format with a space (e.g., M5H 2N2). Ensure your Canada Post account is active.
Contract rates not applying: The Contract ID is optional. If you have negotiated rates, ensure the Contract ID is entered correctly. Without a Contract ID, standard counter rates will be returned.
Customer Number not found: Your Customer Number is displayed in the Developer Program page alongside your API keys. If displayed with fewer than 10 digits, add leading zeros.
Postal Code Format
Canadian postal codes must include a space and use uppercase:
| Correct | Incorrect |
|---|---|
| M5H 2N2 | M5H2N2 (no space) |
| K1A 0B1 | m5h 2n2 (lowercase) |
| V6B 4Y8 | M5H-2N2 (hyphen) |
Next Steps
Need help? Email support@ratetell.com