Integrate Off-Ramp using a URL
Our simple URL based Integration
To benefit from our latest features we strongly advise using our SDKs. However, if your technology stack is incompatible, you can opt to generate MoonPay widget URLs yourself.
You can use the below pre-written code to quickly get started on adding a 'Sell Crypto' button that opens the MoonPay widget in a new browser tab.
<!--Opens the MoonPay widget in a new browser tab-->
<body>
<div class="container">
<button onclick="window.open('https://sell-sandbox.moonpay.com/?apiKey=pk_test_123', '_blank')">Sell with MoonPay</button>
</div>
</body>
.container {
background-color: #392a54;
padding: 20px;
text-align: center;
}
button {
background-color: #7d00fe;
border: none;
color: white;
padding: 15px 50px;
font-size: 16px;
cursor: pointer;
border-radius: 4px;
background-image: url('https://images.crunchbase.com/image/upload/c_lpad,h_170,w_170,f_auto,b_white,q_auto:eco,dpr_1/jglje7ar0xc6j5lvai6t');
background-repeat: no-repeat;
background-position: right center;
background-size: contain;
}
Here's an example. Give it a try!
Updated 8 months ago