Quickstart
Install the SDK and render your first checkout screen in under 10 minutes.
Install the package
The portal object
Every Solvimon component and screen mounts with a portal object: the bridge between your backend (which holds your secret API key) and the SDK (which runs in the customer’s browser).
It’s a PORTAL_URL resource you create via the Solvimon API. It scopes a single SDK session to one customer, one checkout, or one upgrade flow, and carries a short-lived token the SDK exchanges for an access token at runtime.
Where it comes from
Always your backend. Creating a PORTAL_URL requires your secret API key, which must never reach the browser.
See the Create a portal URL endpoint for the full request and response shape, including the available type values.
Lifetime
Portal objects are short-lived: mint a fresh one each time a customer starts a session. Don’t cache them across sessions or share them between customers.
The token inside the portal object is safe to send to the browser; it’s scoped to a single resource and expires. Your secret API key is not, and must stay on your backend.
Render the checkout screen
The walkthrough below mounts the checkout screen into a #sdk-root container, one piece at a time.
Add a mount point
Give the SDK a container to render into. Anywhere on the page works; here it’s a
<section>with acardclass for styling.Import the SDK
Import
createSolvimonCorefrom the core package and grab the container you just added.Supply the portal object
The
portalObjectmust come from your backend. It’s aPORTAL_URLresource you create via the Create a portal URL endpoint, scoped to the customer initiating the checkout. Replace every placeholder value here with a real one.Configure the SDK instance
createSolvimonCoresets the environment, locale, logging, and branding shared by every component or screen you mount from it.Mount the checkout screen
createScreenmounts the screen and returns anunmountfunction. Pass the portal object and any per-screen configuration, such as a prefilled email or country code.Clean up on unload
Call
unmountwhen the container leaves the page, so the SDK can tear down its listeners and state.