Overview
The Terminal Gateway enables communication between your POS (Point of Sale) system and payment terminals. Choose between two protocols based on your integration needs:- HTTP API - Synchronous request/response pattern with long-polling for payments
- WebSocket API - Real-time bidirectional communication with push notifications
Version 1.0 - This documentation covers the current Terminal Gateway API. Contact support@moduluslabs.io to obtain your endpoint URL and credentials.
Protocol Comparison
Choosing a Protocol
HTTP API
Choose HTTP if you need:
- Simple request/response pattern
- Serverless or stateless architecture
- Minimal client-side complexity
- Occasional terminal interactions
WebSocket API
Choose WebSocket if you need:
- Real-time terminal status updates
- Instant payment notifications
- Multi-terminal management
- Persistent connection with push events
API Endpoints
- HTTP API
- WebSocket API
Quickstart
1
Obtain API credentials
Contact support@moduluslabs.io to request API credentials. You’ll receive an API key and API secret pair.
2
Choose your protocol
Select HTTP for simple integrations or WebSocket for real-time features. See the protocol comparison above.
3
Follow the quick start guide
HTTP Quickstart
Get started with HTTP API
WebSocket Quickstart
Get started with WebSocket API
Core Concepts
Both protocols share these core concepts:Single Device Enforcement
One active connection per API key for security
Reconnection Resilience
60-second grace period for terminal reconnections during payments
Authentication
API key provisioning and authentication methods
Data Types
Shared schemas for payments, terminals, and errors
Documentation Structure
HTTP API
- Quickstart - Get started with HTTP
- Endpoints - Complete endpoint reference
WebSocket API
- Quickstart - Connection and setup
- Actions - Commands you can send
- Notifications - Events you receive
Support
For technical support or questions about the Terminal Gateway:- Email: support@moduluslabs.io
- Documentation: Browse the pages in this section for detailed implementation guides