Skip to main content

Connect platform to Moneymade iframe

The iframe is used to show the platform site in the iframe window and allow users to create an account on the platform site without leaving Moneymade. Each user step will be provided with clear instructions to make a process clean as match as possible.

note

If you have a SPA site you need to use the custom functions to provide info about the current registration step if registration flow have a static URL.

Read more here.

First step

Make sure you added moneymade.io to whitelist.

How to add a site to the whitelist?

Most browsers will support the X-Frame-Options header. This header to allow access:

X-Frame-Options: ALLOW-FROM [uri]

You should have something like:

X-Frame-Options: ALLOW-FROM https://moneymade.io/
info

Read more about X-Frame-Options

Second step

Next you need to connect script to the HTML before closing <body> tag. https://moneymade.io/embed/iframe-connect.js

Example:

<!DOCTYPE html>
<html>
<head>
[HEAD CONTENT]
</head>
<body>
[BODY CONTENT]

<!-- Moneymade script -->
<script src="https://moneymade.io/embed/iframe-connect.js"></script>
</body>
</html>

And it's done! Congratulations 😊

Custom functions

You have the ability to send message or URL info to iframe manually using custom functions provided by the script.

Send the URL to Iframe

window.sendUrlToIframe(url) The function accepts URL parameter that means the current URL or current step of the registration flow.

Examples:

window.sendUrlToIframe('https://example.test/sign-up?step-2')
window.sendUrlToIframe('registration-step-2')

Send custom message

window.sendMessageToIframe(message) The function accepts message parameter that means a custom message that u might want to send to the Iframe.

Example:

window.sendMessageToIframe('Email not found')