Try MPE demo here http://mpe-demo.paytomorrow.com
Checkout the source code here https://bitbucket.org/paytomorrow/mpe-plugin/src/master/
npm install @paytomorrow/pt-mpe
Import the module:
HTML tag setup
Copy and paste this on your website:
PayTomorrow MPE API
mpeInit(opt: MpeOptions): void;
Appends PayTomorrow's estimated monthly price to the desired CSS selector and adds an iframe that will be displayed when a user clicks on the monthly price.
NOTE: Use this method if you don't need custom UI for displaying the monthly price.
|false||Display PayTomorrow's MPE console logs for debugging errors.|
|true||Display a link under the MPE for opening the MPE popup.|
|PayTomorrow's logo color on the MPE.|
|5000||Max price limit at which the MPE appears.|
|24||Max financing term available on your PayTomorrow account.|
|500||Min price limit at which the MPE appears.|
|CSS selector for the element in which the MPE will be added.|
|CSS selector for scanning product prices.|
|The store name you want us to display in the popup.|
|Your publicId provided by PayTomorrow (check your Resources tab on the Dashboard).|
|false||Display Micro offers on purchases bellow the |
|false||Display Prime offers for the |
|500||Maximum amount for a micro loan offer.|
|0||The apr used by the prime offers.|
getMonthlyPayment(amount: number, term: number, options?: MpeOptions): number;
Returns the estimated monthly price for the amount and finance term. The options parameter is optional.
addPayTomorrowIframe(storeDisplayName?: string, publicId?: string, channel?: string): void;
Appends PayTomorrow's iframe to the bottom of your page and is hidden by default. This method is only needed if you want to display the MPE popup from a custom page and event.
Displays PayTomorrow's iframe.