README
Alma Widgets
Setup
Add the widget to your page
CSS
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@alma/widgets@2.x/dist/widgets.min.css" />
JS
<script src="https://cdn.jsdelivr.net/npm/@alma/widgets@2.x/dist/widgets.umd.js"></script>
Create the container
<div id="alma-widget"></div>
Initialize the widget
<script>
;(function () {
var widgets = Alma.Widgets.initialize('<YOUR MERCHANT ID>', Alma.ApiMode.LIVE)
widgets.add(Alma.Widgets.PaymentPlans, {
container: '#alma-widget',
purchaseAmount: 45000,
locale: 'fr',
hideIfNotEligible: false,
plans: [
{
installmentsCount: 1,
deferredDays: 30,
minAmount: 5000,
maxAmount: 50000,
},
{
installmentsCount: 3,
minAmount: 5000,
maxAmount: 50000,
},
],
})
})()
</script>
Going further
read the full documentation