1

Configure your Authentication

You’ll need to add the JWKS Endpoint from your Auth Provider to authenticate gasless transactions.
With this JWKS Endpoint setup, you can now run secure code in your frontend using a rotating JWT token.

Getting your JWKS Endpoint

For these common Auth Providers, you can get your JWKS Endpoint like this:
  1. Create a new JWT Template
  2. Copy your Jwks Endpoint and paste it into the JWKS Endpoint field in your Chipi Dashboard.
2

Get your Public Key

Now go to your Api Keys and click on your project.Which will give you access to your Public Key (pk_prod_xxxx). Keep this handy as you’ll need it to initialize the SDK.
You won’t need the Secret Key (sk_prod_xxxx) for now.
3

Install the SDK

npm install @chipi/chipi-sdk
4

Initialize the SDK

  1. Add your Public Key to your environment variables.
NEXT_PUBLIC_CHIPI_PUBLIC_KEY=pk_prod_xxxx
  1. Create a Providers.tsx file to wrap your application.
"use client";

import { ChipiProvider } from "@chipi-pay/chipi-sdk";

const API_PUBLIC_KEY = process.env.NEXT_PUBLIC_CHIPI_PUBLIC_KEY
if (!API_PUBLIC_KEY) throw new Error("API_PUBLIC_KEY is not set");


export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <ChipiProvider
      config={{
        apiPublicKey: API_PUBLIC_KEY,
      }}
    >
      {children}
    </ChipiProvider>
  );
}

  1. In your layout.tsx, wrap your app with the Providers component as shown below:
// app/layout.tsx
import { Providers } from "./providers";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
5

Celebrate & Learn More!

That’s it! You should now have an initial working version of Chipi Pay integrated into your application. You can now start implementing various features like:
  • Wallet Creations
  • Sending tokens
  • Signing transactions
  • and more!
To quickly test the integration, you can use our Test Mode in development.
Need help? Join our Telegram Community to ask us anything on your mind.