Add Payment Info

When user adds payment info, fire below event

window._mp.safeExecute('evAddPaymentInfo', function() {
   eedl('mp_add_payment_info', {
      currency: '<INR or actual currency>', // mandatory
      cart_id: '123', // mandatory
      value: 123.33, // float value of order
      coupon: '<optional coupon>', // Leave this undefined if there is no coupon
      payment_type: 'Credit Card', // optional
      shipping: 123.33, // total shipping value in float
      items: [/* Refer to Products Array page in reference below */],
      ev_source: 'ingestlabs'
    });
})();

Send event from an iframe window

If the event occurs in a iframe window, you need to fire the event using the below script.

window.top.postMessage({
      event_name: 'mp_add_payment_info',
      event_payload: {
            currency: '<INR or actual currency>', // mandatory
            cart_id: '123', // mandatory
            value: 123.33, // float value of order
            coupon: '<optional coupon>', // Leave this undefined if there is no coupon
            payment_type: 'Credit Card', // optional
            shipping: 123.33, // total shipping value in float
            items: [/* Refer to Products Array page in reference below */],
            ev_source: '<Orign of the event>' // Example: 1Checkout, Razorpay, Gokwik, etc.
          }
    },
    'PARENT_URL'
);

PARENT_URL is the url of the website.
Products Array

Last updated