Skip to content

Instantly share code, notes, and snippets.

@megasmack
Last active July 10, 2025 16:38
Show Gist options
  • Save megasmack/29b5cf5540df2815d7e6d0823f1245ca to your computer and use it in GitHub Desktop.
Save megasmack/29b5cf5540df2815d7e6d0823f1245ca to your computer and use it in GitHub Desktop.
LWC Commerce get API Methods Available.
import checkoutApi from "commerce/checkoutApi";
import cartApi from "commerce/cartApi";
console.log("cartApi:", cartApi);
console.log("cartApi keys:", Object.keys(cartApi));
// Optional: Log function names individually
Object.keys(cartApi).forEach((key) => {
console.log(`cartApi[${key}] =`, cartApi[key]);
});
console.log("cartApi dump ----");
console.log("checkoutApi dump ----");
console.log("checkoutApi:", checkoutApi);
console.log("checkoutApi keys:", Object.keys(checkoutApi));
// Optional: Log function names individually
Object.keys(checkoutApi).forEach((key) => {
console.log(`checkoutApi[${key}] =`, checkoutApi[key]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment