Getting Started

Install

Add the following <script> inside your <head> block of your HTML page.

<script type="text/javascript" src="https://cdn.simpler.so/sdk/simpler-checkout.js"></script>

Usage

Once the JavaScript SDK is loaded from the previous step and given a valid appId, a Simpler checkout button can be rendered.

The following JavaScript code snippet, passing the minimum required arguments, will create an instance of Simpler checkout button and append it on the given target HTML element.

const checkout = Simpler.checkout({
  appId: "00000000-0000-0000-0000-000000000000",
  target: document.getElementById("add-to-cart-form"),
  currency: "EUR",
});

With NPM

Another option is to install the @simplerso/web-sdk as an external package to your npm project.