Once all options are set, you can initiate the Web SDK. The below example shows how to initiate both a Payframe and Digital Wallet buttons -MerchantWarrior.createWithToken(token, options).then((mwarrior) => {
// Initiate Payframe
mwarrior.loadPayframe(method, 'cardData', summary).then((mwPayframe) => {
payframeFunctionality(mwPayframe);
});
// Initiate Digital Wallet buttons
mwarrior.paymentRequest(summary).then((element) => {
element.mount('wallet-buttons');
});
mwarrior.on('payment-complete', (status, response, error) => {
// payment complete logic here
});
});
Modified at 2026-07-10 05:25:06