Skip to main content
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).
Most integrations should use the Terminal API (H2H) instead of C2C. The Terminal API provides centralized terminal management, better scalability, and simplified network requirements.

Two C2C interfaces

Send HTTP REST commands to the Gateway App running on the local network. Available endpoints:
  • POST /commands/pay — Create payments
  • POST /commands/cancel — Cancel payments
  • POST /commands/receipt — Print receipts
  • POST /commands/settlement — Run settlement
  • POST /commands/histories — Query transaction histories
BRI / NTT pre-install required: The Terminal C2C API communicates through the Terminal Gateway App. Install and configure it first. Other providers (Cashup, SHC) can receive C2C API calls directly — no Gateway App needed.
Works from any language or platform that can make HTTP requests — web POS, thick clients, or backend services.

Getting started

1

Choose your C2C interface

Decide between the Terminal C2C API (HTTP REST) and the Terminal C2C SDK (native methods). See the comparison above.
2

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.
3

Send your first command

Use the Terminal C2C API endpoints documented below, or the equivalent SDK methods, to create payments and interact with terminals.
Requests to the Terminal C2C API must include the correct provider header (e.g., BRI, NTT, CASHUP, SHC) and the X-API-KEY configured in the Gateway App.

Choosing a connection mode

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
Client-to-Client still requires internet connectivity to process payments and communicate with terminal device providers. It only removes the need for your POS to connect to a central server — the terminals and Gateway App or SDK themselves must still have internet access.
This integration requires managing local network configuration, firewall rules, and direct IP/port access between your POS and terminal devices. You are responsible for ensuring secure network communication.

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.
  • Import the YAML into your API client for quick testing
  • Use it to generate client SDKs and ensure schema accuracy
  • The spec documents endpoints, headers, and request/response bodies