Skip to main content
1

Setup Better Auth with React

First, follow the complete Better Auth Installation Guide to set up authentication in your React app. Then proceed to Better Auth Basic Usage to create login and sign-up pages.This will guide you through:
  • Creating Better Auth tables and schemas
  • Setting up your React app with Better Auth
  • Configuring environment variables
  • Creating auth.ts, mounting the handler, and client instance
Come back here once you’ve completed the Better Auth setup!
2

Setup the Better Auth JWT Plugin

In your auth.ts file, add the JWT plugin:
Then migrate or generate your database to add the JWT tables.
3

Install the Chipi SDK

Install the Chipi Pay SDK for React:
4

Add Environment Variables

Add your API keys to your .env file:
You can get your Chipi API keys from the Chipi Dashboard.
5

Setup the Chipi SDK Provider

6

Creating a Wallet

Create a wallet using Better Auth’s JWT token:
7

Register JWKS in Chipi Dashboard

Register your Better Auth JWKS endpoint in the Chipi Dashboard:
  1. Go to Configure > Auth Provider
  2. Select Better Auth as your provider
  3. Enter your application URL (the dashboard will auto-detect /api/auth/jwks)
  4. Click Verify & Save
Need help? Check out our Telegram Community for support and to connect with other developers.