Embedded Checkout
Web
Install
The public package is @vestonix/web. Import Vestonix. Do not initialize a third-party checkout global.
Browser
import { init, presentCheckout, confirm } from "@vestonix/web";
init({
apiBaseUrl: "https://sandbox-api.vestonix.io",
clientSecret, // vcs_test_… from your server
});
const ui = await presentCheckout({ container: "#checkout" });
const payment = await confirm(); // still not finality — also retrieve / webhook
3DS and return URLs stay on Vestonix-hosted pages. Validate
postMessage origins in the SDK — merchants should not accept arbitrary window messages as paid.