commerce
commerce copied to clipboard
Requirements for a custom checkout
- There should be a hook that returns the entire checkout, including payment and shipping info, e.g
useCheckout
, even if the data isn't there yet. Adding a new payment method or shipping address will then update the checkout hook. This should allow us to work with most UIs someone can build for a checkout - Payment and shipping info should be saved in the logged in account if the provider allows it, so that we can have defaults when proceeding to a checkout, otherwise it should be saved in the checkout, if that is not possible either then we'll need to use a third party DB
- For some providers the checkout might be the cart, or a different object, whatever it is the behavior must remain equal