Building with Expo
This guide will walk you through integrating Chipi Pay into your Expo application with biometric authentication and secure storage. We’ll cover everything from installation to implementing secure payment flows.Prerequisites
- Node.js 16 or later
- Expo CLI
- Basic knowledge of React Native
- A Chipi Pay account
- Clerk account for authentication
- Device with biometric authentication support (for biometric features)
Getting Started
To get started with Chipi Pay in your Expo application, you’ll need to have a basic Expo project set up. If you don’t have one yet, you can create it using:Installation
First, install the required packages:Configuration
- Create a
.env
file in your project root and add your API keys:
- Update your
app.json
to include the required permissions:
Implementing Secure Authentication Flow
- Initialize the SDKs with secure storage:
Adding Clerk JWT Templates
1
1. Define the Data to Gather
Decide which user attributes you need to include in your JWT. For example: userId, email, role, or any custom claims relevant to your application.
2
2. Create the JWT Payload Template
Draft a template for your JWT payload. For example:Replace the email and orgId Keys with the actual data you want to gather.
3
3. Generate the JWT
Use your backend or authentication provider to generate a JWT using the template. Click to see more about JWT tokens:This JWT can now be used to securely transmit the gathered user data.
4
4. Register JWT in Your Application
Register JWKS Endpoint URL in the dashboard
Setting up Secure Storage and Biometric Authentication
- Create a secure storage utility:
Next Steps
- Add error handling and loading states
- Customize the UI to match your app’s design
Need help? Check out our Telegram Community for
support and to connect with other developers.