Basic API Fundamentals
This guide will give you everything you need to start using the ZenPay API to manage payments, process transactions, and integrate with your applications.
Getting Started
The ZenPay API provides programmatic access to payment processing, and transaction management, allowing developers to build custom payment solutions and integrate ZenPay services into their applications.
To use the ZenPay API, you need a merchant account. Once you have an account and are logged in, you can get your keys and begin making calls to the API.
Base URL
All API requests should be made to:
https://api.thezenpay.com
API Structure
While the ZenPay API is REST-based, some data-fetching endpoints use POST instead of GET to support additional security requirements..
- Resource paths are typically nouns, such as payments or payouts.
- Actions are represented by HTTP methods (GET, POST).
- Content-Type is application/json for all requests.
- Responses are returned in JSON format, except for the
/v1/payments/initiateendpoint which returns a html payment form. - Timestamps parameters in the request body are in UTC and follow the ISO 8601 format.
Authentication
The ZenPay API uses either API keys or secret keys for authentication. You can find your respective keys in your merchant dashboard under the API section.
Important: Never share your keys or include them in client-side code. Keep them secure and regenerate them if compromised.
Quick Start
Follow these essential steps to get started with the ZenPay API quickly and securely.
- ↳ Contact ZenPay support to get a merchant account that can be used to get your biller code, API key, and secret key for both development and production environments.
- ↳ Request IP whitelisting through your merchant dashboard. This is mandatory for payment and payout operations. Please refer to the IP Whitelisting page section for more details.
- ↳ Start with the health check endpoint to verify API connectivity before implementing other features.
GET /v1/health - ↳ Learn the HMAC-SHA256 signature process for secure authentication of payment operations.
- ↳ Retrieve available bank lists to populate your payment forms before initiating actual payments.
Test vs Live Environment
ZenPay provides both test and live environments:
- Test Environment: Use for development and testing
- Live Environment: Use for production transactions
Note: Always test your integration thoroughly in the test environment before going live.