Integrate Payman’s OAuth to securely access APIs using Client Credentials or Authorization Code flows.
Field | Description |
---|---|
Purpose | Why your app needs access |
Redirect URIs | Where the user is redirected after granting access (max 5) |
Origin Domains | Allowed domains for your frontend (max 5) - Make sure you add https://app.paymanai.com/ as one of the originating domains |
Scopes | Which permissions you’re requesting |
Transaction Limits | Maximum allowed per transaction |
Scope | Permission |
---|---|
read_balance | View wallet balances |
read_list_wallets | View list of connected wallets |
read_list_payees | View all existing payees |
read_list_transactions | View wallet transaction history |
write_create_payee | Create a new payee |
write_send_payment | Send money to an existing payee |
write_create_wallet | Programmatically create a new wallet |
Add more data-scopes as needed, always separate them with commas without spaces.
Attribute | Description | Required |
---|---|---|
data-client-id | Your client ID | Yes |
data-scopes | Requested scopes | Yes |
data-redirect-uri | Redirect after auth | Yes |
data-target | Where to inject button | Yes |
data-dark-mode | Dark mode toggle | No |
strategy | Script loading strategy | No |
data-styles | Custom styles | No |
redirect_uri
with an authorization code
.
Use the provided code snippet to:
⚠️ Security Note: Never exchange OAuth codes in frontend code. Always pass them to your backend to handle token exchange securely using your client secret.
✅ Tokens expire — always track the expiresIn
and refresh if needed.
🚫 Warning: Never hardcode or expose access tokens in frontend web apps. Use environment variables or secure storage.