Quick Start - HTML

There is another way to integrate Ramp via SDK by putting code right into your HTML files. Here's how to do it.

Using the SDK

A basic example embedded in HTML looks like this:

<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<!--- Include Ramp SDK -->
<script src="https://cdn.jsdelivr.net/npm/@ramp-network/ramp-instant-sdk@2.5.0/dist/ramp-instant-sdk.umd.js" integrity="sha256-YOWvxewL6tQoz1eAnLtjDvIX2Vhg6uzFsRvjmcAsom0=" crossorigin="anonymous"></script>
<button type="button" id="buy-with-ramp-button">Buy with Ramp</button>
<!--- Start Ramp on button click -->
<script type="application/javascript">
const startRamp = () => {
new rampInstantSdk.RampInstantSDK({
hostAppName: 'yourDApp',
hostLogoUrl: 'Link to your logo',
.on('*', (event) => console.log(event))
document.querySelector('#buy-with-ramp-button').addEventListener('click', startRamp);

Clicking the button launches Ramp's widget.

A more detailed list of the available configurations with examples can be found here.

That's it! Create an instance of the SDK with a configuration object and call the .show() method when you're ready to display Ramp to your user.

It's important to remember that one instance of the SDK corresponds to one instance of the widget - if you want to close Ramp Instant and open it again, you'll need to initialize our SDK again.