Client-to-client lets your POS or backend communicate directly with terminal devices over the local network, bypassing Xendit’s cloud. You can interface with terminals using either the Terminal C2C API (HTTP REST) or the Terminal C2C SDK (native Android/iOS methods).
Two C2C interfaces
- Terminal C2C API (HTTP)
- Terminal C2C SDK (Native)
Send HTTP REST commands to the Gateway App running on the local network. Available endpoints:
POST /commands/pay— Create paymentsPOST /commands/cancel— Cancel paymentsPOST /commands/receipt— Print receiptsPOST /commands/settlement— Run settlementPOST /commands/histories— Query transaction histories
Works from any language or platform that can make HTTP requests — web POS, thick clients, or backend services.
Getting started
Choose your C2C interface
Decide between the Terminal C2C API (HTTP REST) and the Terminal C2C SDK (native methods). See the comparison above.
Configure device connectivity
- Terminal C2C API path: Follow the Gateway App configuration to enable Client-to-Client mode. Note the device IP and port (default 8189) and set the API key.
- Terminal C2C SDK path: Add the SDK to your Android or iOS project. See the Android SDK or iOS SDK setup guide.
For the C2C API path you should see the device IP on the Gateway App home screen and be able to reach
http://{IP}:{PORT} from your network.Choosing a connection mode
Recommended: Host-to-Host (H2H)
Recommended: Host-to-Host (H2H)
Host-to-Host is recommended for most integrations because it:
- Centralizes terminal management and monitoring
- Scales to many devices and locations
- Simplifies network/security by avoiding direct device access
- Reduces POS coupling to terminal networks
Use Client-to-Client when
Use Client-to-Client when
Consider Client-to-Client only for these specific use cases:
- Locally managed POS systems: Your cashier/POS system runs entirely locally without a central server backend
- Bundled distribution: You want to bundle your POS system with terminal devices for distribution to retail stores without any central backend system
- Offline-capable terminals: You need terminals that can operate with intermittent connectivity, though internet access is still required for payment processing
OpenAPI Specification
Download the complete OpenAPI 3.1.0 specification for the Terminal C2C API
to integrate with your development tools. Import it into Postman, Insomnia,
or any OpenAPI-compatible client.