[Skip to main content](#vessel-content)

#   CanadaPost shipping plugin problem

##

- **[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")**
- [![DogPeople's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57755-dogpeople "View DogPeople's Profile") Topic Author
- [ Offline](/forum/user/57755-dogpeople)

Less More

- Posts: 324
- Thank you received: 4
-
-

2 years 6 months ago -  2 years 6 months ago [\#360660](#360660) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360660 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")* was created by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")*

-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys are used with development endpoints.

Hi there,

I've configured my CanadaPost shipping plugin as per the instructions here: [ www.hikashop.com/support/documentation/3...dapost-adv-form.html](https://www.hikashop.com/support/documentation/369-hikashop-shipping-canadapost-adv-form.html)

As far as I can tell, your plugin requires the postal code to be XXXXXX, but the format for Canadian postal codes is actually XXX XXX.

There's a space in the middle.

Is this what is causing the problem, and if so, how can I change it? People will enter their postal codes with the space most of the time.

I also found this, which indicates that this might be a coding error with the plugin? [ github.com/verbb/postie/issues/25](https://github.com/verbb/postie/issues/25)

Please advise how to fix the postal code field (if required) to accept postal codes with spaces where they're supposed to be OR no space, and how to resolve the endpoint issue.

Last edit: 2 years 6 months ago by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

2 years 6 months ago [\#360662](#360662) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360662 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hello,

You have a setting called "sandbox" ; that settings change from "test" to "production".
If you entered production credentials but indicates that you're in sandbox mode, the credentials would be refused with such error message.

Regarding the postcode, the plugin handles perfectly post codes with spaces in it.
The plugin does not refuse the postcode in your configuration if you add a space in it.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")**
- [![DogPeople's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57755-dogpeople "View DogPeople's Profile") Topic Author
- [ Offline](/forum/user/57755-dogpeople)

Less More

- Posts: 324
- Thank you received: 4
-
-

2 years 6 months ago [\#360687](#360687) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  Replied by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360687 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

I changed that and tested again. Got this. Seems like the space is a problem?  [ ![Screenshot2024-04-29at15-13-02Checkout-BudgetBooks.png](/forum/attachment/59195) ](/forum/attachment/59195 "...udgetBooks.png")

- [ ![Screenshot2024-04-29at15-13-02Checkout-BudgetBooks.png](/forum/attachment/59195) ](/forum/attachment/59195 "...udgetBooks.png") [ ](/forum/attachment/59195?download=1 "...udgetBooks.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

2 years 6 months ago [\#360697](#360697) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360697 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hello,

The plugin had some code to handle customer post-codes with spaces ; after a new check, the postcode from your configuration is sent directly to the API which does not accept spaces (it's not our fault, it's from Canada Post itself).
Thus, I added a new patch in order to remove spaces from the postcode configuration when sending it to the Canada Post API.

Your can re-download the plugin to get the fix.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")**
- [![DogPeople's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57755-dogpeople "View DogPeople's Profile") Topic Author
- [ Offline](/forum/user/57755-dogpeople)

Less More

- Posts: 324
- Thank you received: 4
-
-

2 years 6 months ago -  2 years 6 months ago [\#360703](#360703) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  Replied by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360703 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Thanks, that fixed it.

However, it looks like there isn't any option for oversized letter mail.

When you're shipping smaller items, like books, very often, they will fit into oversized letter mail, which is much more cost-effective. In fact, anything that is under 500 grams and fits the dimensions specified would be shipped with this method inside Canada

Is there any way to add that option to the list of options for the CanadaPost plugin? It is limited to certain sizes and dimensions if that is a factor.

I considered putting in a flat rate for that option and using minimum weights and sizes to restrict the Canada Post option to anything larger than that, but you only have a total volume option, so I can't override the individual dimensions. I'd need to be able to specify the length, width and thickness of each item to do that.

Here's a link to that page in case you need more information to update the plugin: [ www.canadapost-postescanada.ca/cpc/en/su...ze-requirements.page](https://www.canadapost-postescanada.ca/cpc/en/support/articles/lettermail/size-requirements.page)?

Last edit: 2 years 6 months ago by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

2 years 6 months ago [\#360706](#360706) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360706 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hello,

Are you using the "Library Books" service ?

I understand your need but I don't know how the plugin can handle that since the plugin is creating packages via the HikaShop packaging function and then call the Canada Post APIs (for the different enabled services) in order to get the right price.
I read the link you gave but there is no information to "update the plugin".

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")**
- [![DogPeople's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57755-dogpeople "View DogPeople's Profile") Topic Author
- [ Offline](/forum/user/57755-dogpeople)

Less More

- Posts: 324
- Thank you received: 4
-
-

2 years 6 months ago -  2 years 6 months ago [\#360724](#360724) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  Replied by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360724 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hi,

The Library Books service is only for actual libraries. This is not a library. What I need is oversized letter mail.

Failing that, I need to have the option to exclude it based on the dimensions of the items - length, breadth, and thickness. Currently, your plugin only has volume, which won't work because if ANY of the dimensions exceed the Canada Post parameters (as per the link), it changes the shipping options.

So, I need you to enable oversized letter mail or change the volume parameters to individual dimensions rather than a single number.

Your plugin is built for people who ship larger items, but many online sellers ship small items, and currently, it does not offer the functionality required for shipping those small items cost-effectively.

I don't know how this helps, but this is how the WooCommerce platform integrates the oversized letter mail option in their CanadaPost plugin. [ www.pluginhive.com/canada-post-letter-ma...r-woocommerce-users/](https://www.pluginhive.com/canada-post-letter-mail-services-for-woocommerce-users/)

Last edit: 2 years 6 months ago by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

2 years 6 months ago [\#360754](#360754) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360754 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hello,

Regarding the documentation, the "letter mail" is not part of the Canada Post rate API ; which means it requires some specific development in order to pack the products into specific packages and get the rate like the "weights" plugin is doing.
Because every shipping plugins are based on the HikaShop packaging function ; it will be difficult for me to add that specific feature into the Canada Post plugin.since it won't be base on the HikaShop core.
I do think such kind of packaging configuration should be handle by the core so every shipping plugins could benefits.

If you know which products can be send by "letter mail" or not ; you can use the "warehouse" system and affect manual shipping configuration to set the specific canada post letter mail rates ; it's also possible to use the "weights" shipping plugin if you want to configure all rates by weight in a single configuration.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")**
- [![DogPeople's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57755-dogpeople "View DogPeople's Profile") Topic Author
- [ Offline](/forum/user/57755-dogpeople)

Less More

- Posts: 324
- Thank you received: 4
-
-

2 years 6 months ago [\#360761](#360761) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  Replied by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360761 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hi,

I actually already did that exact thing.

I have to manually assign the warehouse to the products that meet all the parameters, but it does work for now.

I'll contact CanadaPost and find out if they can add letter mail to their API. It's silly that it's not there already.

It would be really good if the shipping configuration included length, breadth and width rather than just volume. A lot of shippers have specific criteria for that. Even if you want to use flat rate options from them, you need to be able to fit them into a specific box, so you need to be able to configure that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

2 years 6 months ago [\#360771](#360771) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[CanadaPost shipping plugin problem](/forum/28-shipping-methods/908099-canadapost-shipping-plugin-problem#360771 "-- Error-message(debug-mod must be tuned on) -- : There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys...")*

Hello,

> It would be really good if the shipping configuration included length, breadth and width rather than just volume.

These settings are part of the HikaShop core ; it's not part of Canada Post plugin.
You can create a new thread for your feature request or I can assign the thread to someone from the HikaShop support team (since it was talking about the Canda Post plugin, the thread has been assigned to me).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4MDk5LWNhbmFkYXBvc3Qtc2hpcHBpbmctcGx1Z2luLXByb2JsZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.085 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
