Understanding API Keys
HB
Updated by Hweb Admin
Dec 28, 2025 • 1 min read
To interact with the HwebPay API, you need a pair of API keys. These keys identify your account and grant access to various endpoints.
Key Types
- Public Key: Used in frontend code (like Javascript) to initiate the checkout popup. It is safe for the public to see.
- Secret Key: Used in backend code (PHP, Python, Node.js) to verify transactions and manage payouts. NEVER share this key or commit it to a public repository like GitHub.
Environment Toggling
HwebPay provides two separate environments:
- Test Mode: Uses
pk_test_...andsk_test_.... No real money is moved. Perfect for local development. - Live Mode: Uses
pk_live_...andsk_live_.... Processes real payments. Requires account activation.