1
Get your public key
In the partners console, open Website messaging and create
a key. Test keys (
pk_test_) work against the sandbox, live keys (pk_live_) against
production.2
Add a container where the line should appear
Near the price, or under the “Add to cart” button:
3
Load the script and create the component
krtiAsyncInit runs once, whether it is defined before or after the script tag. With a
blocking <script> (no async) call new KrtiPromo(...) right after it instead.4
Update the amount when it changes
Variant and quantity selectors change the price. Keep the instance and call
update:5
Add the checkout card
Under your MyFatoorah payment option, shown when it is selected:
Try it without a store
The demo page renders both components with your key:https://sandbox-js.krti.com/demo/index.html?key=pk_test_... (sandbox) or
https://js.krti.com/demo/index.html?key=pk_live_... (production). Add &lang=ar for Arabic,
&theme=dark for the dark theme and &badge=dark for the dark badge.