These SDKs are deprecated and in maintenance — no new features are being added. New integrations must use the Unified SDK (linked below). This page is retained only as a reference for merchants with an existing integration on the older SDKs.
The GlomoPay web checkout was previously delivered as separate per-flow SDKs. These have been superseded by the single Unified SDK (GlomoCheckoutApi from https://unified-sdk.glomopay.com/index.js), which auto-detects the order type (standard, LRS, subscription). New integrations must use the Unified SDK.
The snippets below document the older SDKs for reference by existing integrations. They are functionally frozen.
Loaded from https://glomopay-checkout-sdk.web.app/index.js, exposing GlomoCheckoutApi:
<script type="module">
import { GlomoCheckoutApi } from 'https://glomopay-checkout-sdk.web.app/index.js';
const checkout = new GlomoCheckoutApi({
publicKey: 'live_xxx',
orderId: 'order_xxx', // or subscriptionId for subscriptions
});
checkout.on('payment.success', (response) => { /* ... */ });
checkout.on('payment.failure', (response) => { /* ... */ });
checkout.on('checkout.closed', () => { /* ... */ });
checkout.open();
</script>Migrating to the Unified SDK: change the import to https://unified-sdk.glomopay.com/index.js. The GlomoCheckoutApi constructor and events are unchanged — see the Unified SDK reference. Note one behavioural difference: with the Unified SDK, setting callbackUrl makes it only redirect (it does not also emit .on() events), whereas the legacy checkout SDK did both.
Loaded from https://lrs-checkout-sdk-prod.web.app/index.js, exposing LrsCheckoutApi:
<script type="module">
import { LrsCheckoutApi } from 'https://lrs-checkout-sdk-prod.web.app/index.js';
const lrsCheckout = new LrsCheckoutApi({
publicKey: 'live_xxx',
orderId: 'order_xxx',
});
lrsCheckout.on('payment.success', (data) => { /* ... */ });
lrsCheckout.on('payment.failure', (data) => { /* ... */ });
lrsCheckout.on('checkout.closed', () => { /* ... */ });
await lrsCheckout.open();
</script>Migrating to the Unified SDK: the Unified SDK handles LRS through the same GlomoCheckoutApi, so a separate LrsCheckoutApi is no longer needed. Change the import to https://unified-sdk.glomopay.com/index.js and use GlomoCheckoutApi; the events are unchanged. (Note: the legacy LRS SDK emits checkout.closed — an earlier version of the LRS guide showed a close event, which never actually fired.) See the Unified SDK reference.