Authentication
The PaysGator API uses API Keys for authentication. All requests should include your API Key in the X-Api-Key header.
API Keys
You can find your API keys in the PaysGator Dashboard under the Developers section. There are two types of keys:
- LIVE Keys: Used for real transactions.
- TEST Keys: Used for testing and integration. No real money is moved.
[!IMPORTANT] Keep your API keys secret. Do not share them or include them in client-side code (frontend).
How to Authenticate
Include the X-Api-Key header in all your API requests.
X-Api-Key: pg_live_your_api_key_here
Example Curl Request
curl -X GET "https://paysgator.com/api/v1/wallet/balance" \
-H "X-Api-Key: YOUR_API_KEY"
Error Responses
- 401 Unauthorized: The API Key is missing or invalid.
- 403 Forbidden: You do not have permission to access the requested resource (e.g., trying to access a LIVE transaction with a TEST key).