Overview
The Payout API uses two different authentication methods depending on the operation:- API Key Authentication (Bearer Token) - For business operations
- Hash Authentication - For user payout operations
API Key Authentication
When to Use
API Key authentication is used for business operations such as:- Creating payout users
- Adding funds to existing users
- Managing payout balances
- Viewing payout user information (for business accounts)
How It Works
Include your API key in theAuthorization header of each request:
Getting Your API Key
1
Log In to Dashboard
Access your Payviox Dashboard
2
Navigate to Developer Section
Go to Developer > API Keys
3
Copy Your API Key
Copy your production API key (keep it secure!)
Example Request
Hash Authentication
When to Use
Hash authentication is used by payout users to access their funds and perform operations such as:- Viewing their payout balance
- Making withdrawals (gift cards, crypto, etc.)
- Accessing payout history
How It Works
When you create a payout user, the API returns a unique SHA256 HMAC hash. This hash is used to authenticate the user’s requests.Using the Hash
The hash can be provided in three ways (in order of preference):- Header (Most Secure):
X-Payout-Hash: YOUR_HASH - Request Body:
{"payout_hash": "YOUR_HASH"} - Query Parameter:
?payout_hash=YOUR_HASH(for backward compatibility)
Example Request with Hash
Hash Characteristics
Consistency
- The hash is deterministic: the same email address always generates the same hash
- The hash is unique per business: same email for different businesses will have different hashes
- The hash cannot be reverse-engineered: you cannot determine the email from the hash
Security
- Hash generation uses a server-side secret key that is never exposed
- Hashes are validated against active payout users only
- Expired or inactive users cannot use their hash
Error Responses
Missing Authentication
Invalid API Key
Invalid or Inactive Hash
Payouts Disabled
Security Best Practices
Store API Keys Securely
Never commit API keys to version control. Use environment variables or secure secret management.
Use HTTPS Only
Always make API requests over HTTPS to protect your credentials in transit.
Rotate Keys Regularly
Periodically regenerate your API keys for enhanced security.
Protect Hash Values
Treat payout hashes as sensitive credentials. Don’t expose them in URLs or logs.
Use Header Authentication
Prefer header-based hash authentication over query parameters or body parameters.
Monitor Usage
Regularly check your API usage and payout operations in the dashboard.