Skip to content

Installation

Setup Glide in just a few lines of code

Install Glide SDK

npm
npm install @paywithglide/glide-js

Configure

config.ts
import { createGlideConfig } from "@paywithglide/glide-js";
import { base, optimism } from "@paywithglide/glide-js/chains";
 
export const config = createGlideConfig({
  projectId: "your project id",
  chains: [base, optimism],
});

You can now pass the config to any action in the Glide SDK.

import { listPaymentOptions } from "@paywithglide/glide-js";
import { config } from "./config"; 
 
const paymentOptions = await listPaymentOptions(config, { 
  ..
});