Time for another exciting release of Medusa!
Version 1.7.3 moves Sales Channels and Publishable API Keys out of beta, introduces improvements for events system and payment sessions, and more.
Keep reading below to learn more about all the new changes in this release of Medusa!
How to Update Medusa?
You can update your Medusa server using the following command:
npm install @medusajs/medusa@latest @medusajs/medusa-cli@latest medusa-interfaces@latest
Then, please follow the upgrade guide for additional required steps.
You can also update the Medusa Admin by pulling changes from the GitHub repository.
We first introduced Sales Channels in v1.3.5 of Medusa. However, as this feature was in beta mode, it was guarded by feature flags. As of v1.7.3, it is enabled by default.
If you’re not familiar with what sales channels are, they allow merchants to create separate channels they sell their products in. Then, they can specify which sales channels are available in that sales channel.
Subsequently, this would lead to showing customers only products available in their sales channels.
For example, in a B2B use case, a merchant can create a B2B sales channel with products only available for B2B customers. Other types of customers wouldn’t be able to purchase these products.
Learn more about Sales Channels in this documentation.
Publishable API Keys
Publishable API Keys are used to associate resources with an API key. Then, when that publishable API key is used on the client-side, retrieving or processing data is only performed on the defined scope of resources for this API key.
This can be useful when you have resources that you have to pass as parameters for every or most requests.
An example of this is using sales channels on the storefront. You would need to pass the ID of the sales channel to the list products and the create cart requests, among others. This approach is error-prone and can be a hassle during development.
With Publishable API keys, you can just pass the API key in the header of the request. When using tools like Medusa JS Client or Medusa React, you only need to pass the API key once, and it’ll automatically be added to all requests.
At the moment, publishable API keys can only be associated with sales channels.
Learn more about Publishable API Keys in this documentation.
Improvements in the Events System
Medusa’s events system allows you to subscribe a handler method to certain events. The handler method would perform asynchronous action when the event is triggered.
For example, you can subscribe to the
event so that when it’s triggered, you send the customer an email.Copy to clipboard
In v1.7.3, we introduce improvements into the events system, the main being the ability to retry failed handler methods. Errors can commonly occur in handler methods, either due to errors in the logic of the method or due to errors with third-party services.
You can now specify a unique ID of a subscribed event handler and specify how many times it should be retried in case it fails. Improvements also include enhanced readability.
Learn more about the events architecture in this documentation.
New Payment Session Flow
In v1.7.3, we refactored our payment session flow to improve its performance. The new change reduces the amount of times Medusa communicated with the third-party payment providers.
This improvement does not require any changes in how you use and implement the checkout flow or any payment-related flow.
Redesigned Admin Sidebar
The admin sidebar is now redesigned for a clearer design. The team and users section is now removed, and the sidebar is only focused on important links such as Orders and Products.
In upcoming versions, we’ll introduce additional redesign changes such as collapsible sidebar, history, improved help center, and more.
In our documentation we’ve implemented general fixes and added new documentation pages such as:
- Storefront guide on how to implement customer profiles.
- Gift cards conceptual guide along with how-to guides for storefronts and admins.
- Claim-order flow documentation.
- Development guide on how to customize Medusa Admin.
Did you miss out on?
- Implementing 5 features in Nike’s Ecommerce Store with Medusa
- How we improved our documentation
- Top 10 Medusa Blog Posts of 2022
- Next.js Storefront: Building a Food Ecommerce Restaurant with Medusa and Paystack
- 10+ Live Chat Widgets for Ecommerce Stores in 2023
Should you have any issues or questions related to Medusa, then feel free to reach out to the Medusa team via Discord.
Share this post
You may also like
May 25, 2023
Good Chef & Webbers: Powering subscriptions with Medusa’s commerce modules
Shahed and Nicklas
On this page