PricingContext

The context to calculate prices. For example, you can specify the currency code to calculate prices in.

contextRecord<string, [BigNumberInput](/references/pricing/types/pricing.BigNumberInput)>Optional
an object whose keys are the name of the context attribute. Its value can be a string or a BigNumberInput. For example, you can pass the currency_code property with its value being the currency code to calculate the price in. Another example is passing the quantity property to calculate the price for that specified quantity, which finds a price set whose min_quantity and max_quantity conditions match the specified quantity.
Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break