Swipelux

Quickstart guide

This is a quick step-by-step guide on how to integrate the Swipelux On-Ramp widget into your website.

Whether you are a complete beginner to coding or a seasoned expert, this guide will take you through all of the necessary steps to have you converting fiat to cryptocurrency in no time.

Prerequisites

  • An IDE or text editor: We recommend using Visual Studio Code or Cursor.
  • A web browser: Any modern browser will do, such as Chrome, Firefox, or Safari. Obviously, if you're reading this documentation, then you're already good to go.

Start building

Create a Merchant account

If you don't have a Swipelux merchant account, you can sign up for free at merchant.swipelux.com.

From now on, we'll refer to this website as the Merchant Panel.

In case you need assistance, contact us at partner@swipelux.com.

Retrieve your publishable API key

Navigate to the Developers > API keys page of the Merchant Panel and copy your publishable API key.

API keys

Set up a file for your integration

In your IDE, create a new project (if you don't have one already) and create a new file in your project. Let's call it onramp.html.

Add the following code to your onramp.html file:

onramp.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Swipelux On-Ramp Integration</title>
 
    <!-- Adds the Swipelux On-Ramp SDK to your page -->
    <script
      crossorigin="anonymous"
      src="https://cdn.jsdelivr.net/npm/@swipelux/onramp-js@^1.0.0"
    ></script>
  </head>
 
  <body>
    <!-- Displays the Swipelux On-Ramp widget on your page -->
    <swipelux-widget api-key="YOUR_PUBLISHABLE_API_KEY"></swipelux-widget>
  </body>
</html>

Make sure to replace YOUR_PUBLISHABLE_API_KEY with your actual publishable API key from the previous step.

You're all set!

Yes, that's it. You've now embedded the Swipelux On-Ramp widget into your page. Now you can open the onramp.html file in your browser and see the widget in action.

You should see something like this:

On this page