Authentication
JWT Authentication
Authentication Flow
The widget uses JWT (JSON Web Token) authentication to securely communicate with the orda API:
Token Permissions
Your JWT should include the following permissions:
quotes:read
Generate payment quotes
offramp:read
Off-ramp operations (crypto → fiat)
onramp:read
On-ramp operations (fiat → crypto)
transactions:read
View transaction status
recipients:read
List saved recipients
recipients:write
Create/update recipients
Security Best Practices
Never expose
clientSecretin browser codeAlways generate JWT server-side
Use environment variables for secrets
Never commit secrets to version control
Use HTTPS in production
Ensure your JWT endpoint uses HTTPS
Tokens sent over HTTP can be intercepted
Implement rate limiting
Limit JWT generation requests per IP/user
Prevent abuse of your authentication endpoint
Set appropriate token expiration
Default: 1 hour (
expiresIn: 3600)Balance security and user experience
SDK handles auto-refresh seamlessly
Example with Error Handling
Environment Variables
Required Variables
ORDA_CLIENT_ID
orda project ID (server-side)
orda Developer Portal
ORDA_CLIENT_SECRET
orda API secret (server-side)
orda Developer Portal
Optional Variables
NEXT_PUBLIC_ORDA_API_BASE_URL
orda API base URL
https://api.orda.network/v1
Example .env.local
Getting Your Credentials
WalletConnect Project ID
Visit cloud.reown.com
Sign up or log in
Create a new project
Copy your Project ID
Add your app domains to the allowlist
Last updated