www/apps/resources/references/module_events/module_events.Cart/page.mdx
import { TypeList } from "docs-ui"
This reference shows all the events emitted by the Medusa application related to the Cart Module. If you use the module outside the Medusa application, these events aren't emitted.
<EventHeader headerLvl="2" headerProps={{ id: "cartcreated", children: (<>cart.created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="cart.created" payload={\``ts
{
id, // The ID of the cart
}
````} />
Emitted when a cart is created.
{
id, // The ID of the cart
}
The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.
<EventHeader headerLvl="2" headerProps={{ id: "cartupdated", children: (<>cart.updated</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="cart.updated" payload={\``ts
{
id, // The ID of the cart
}
````} />
Emitted when a cart's details are updated.
{
id, // The ID of the cart
}
The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.
<EventHeader headerLvl="2" headerProps={{ id: "cartregion_updated", children: (<>cart.region_updated</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="cart.region_updated" payload={\``ts
{
id, // The ID of the cart
}
````} />
Emitted when the cart's region is updated. This
event is emitted alongside the cart.updated event.
{
id, // The ID of the cart
}
The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.
<EventHeader headerLvl="2" headerProps={{ id: "cartcustomer_transferred", children: (<>cart.customer_transferred
<Tooltip text="This event was added in version v2.8.0">
<Badge variant="blue">v2.8.0</Badge>
</Tooltip></>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="cart.customer_transferred" payload={\``ts
{
id, // The ID of the cart
customer_id, // The ID of the customer
}
````} />
Emitted when the customer in the cart is transferred.
{
id, // The ID of the cart
customer_id, // The ID of the customer
}
The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.