#credit system

5 messages · Page 1 of 1 (latest)

arctic vault
#

Hi everyone,

I'm working on a custom storefront using MedusaJS, where I want to implement a credit system that customers can use when making purchases. My goal is to allow users to apply their credits to reduce the total price of their cart.

However, I haven't found an API in MedusaJS that allows me to modify the cart total based on the customer's available credits. Any guidance or suggestions on how I can implement this?

Thank you!

mint crater
#

Also keen to see this implemented. Let me know if you've made any progress?

torn hull
#

hi @arctic vault - the easiest way is to create your own API endpoint and use it instead of built-in adding to the cart (or making an order). You can then do whatever you want when the person tries to add to the cart (or makes an order) - for instance check the balance of the credits, take the current price and reduce it based on the available credits.

mint crater
#

Ah yeah, that would be a nice approach. Would be good to have it as an official Medusa module or plugins though. I’m happy to chip in with costs for an open implementation

torn hull