How I think this Printful - Medusa integration is going to work
Backend
-
Sync Printful store with Medusa
- This includes all products and variants
- Shipping cost
- This includes all products and variants
-
Continuously keeping Medusa in sync with Printful may require setting up webhooks on Printful for when items are deleted, updated etc
Storefront
-
Render all products - https://docs.medusajs.com/references/js-client/classes/ProductsResource
-
Use Medusa.js for carts/checkout - https://docs.medusajs.com/references/js-client/classes/CartsResource a. I would need a wire up the printful tax calculator around here too - https://developers.printful.com/docs/#tag/Tax-Rate-API
Regarding the payment and fulfilment with Printful. Iām unsure of the correct flow for this. In my head this how I think it should work.
- Confirm payment is received from the customer in Medusa.
- on the
order.payment_captured
event, I could fire off a Printful order via their API with details captured in Medusa- https://developers.printful.com/docs/#tag/Orders-API - ???
- Profit ?!
- tunnel localhost to the web with ngrok