Skip to main content
The fastest way to implement Halliday is by utilizing the JS SDK widget user interface.

Try the Halliday JS SDK Widget

Following this guide, or the JS SDK Widget Documentation guide will result in an onramp experience like in the following demo.

Integrate Halliday

Follow these steps to integrate Halliday in just a few minutes.
1

Obtain API Keys

To get set up with API access for Halliday, get a free API key at dashboard.halliday.xyz.
2

Integrate

First, install the Halliday JS SDK into a web project.
copy
npm install @halliday-sdk/payments
Next, integrate Halliday into an existing application with a few lines of code. This example is in a React.js project with Wagmi.
copy
import { useEffect } from "react";
import { openHallidayPayments } from "@halliday-sdk/payments";
import { connectWalletClient } from "@halliday-sdk/payments/viem";
import { useAccount, useWalletClient } from "wagmi";

export default function App() {
  const { address, isConnected } = useAccount();
  const { data: walletClient, isSuccess } = useWalletClient();

  useEffect(() => {
    if (!isConnected || !isSuccess || !walletClient || !address) return;

    const userWallet = connectWalletClient(() => walletClient);

    openHallidayPayments({
      apiKey: HALLIDAY_API_KEY,
      outputs: ["base:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"],
      targetElementId: "halliday",
      destinationAddress: address,
      userWallet,
    });
  }, [isConnected, isSuccess, walletClient, address]);

  return <div id="halliday" />;
}
Run the app page and try onramping or swapping tokens with the newly implemented Halliday Payments Widget. Try it now using the button above.