API
The client shape is the same across C++, Java, and C#. Differences are called out inline.
Info
Every string the client sends or receives is a JSON-RPC 2.0 payload: a request (passed to sendRequest), a response or error (delivered to that call's ResponseCallback), or a notification (delivered to NotificationCallback). The client itself doesn't interpret these — see the API reference for the actual method/param definitions.
Enums
Callbacks
Builder
Constructed with a TransportType; every setter returns the builder for chaining.
Client
Info
Java and C# hold a native handle and must call destroy() / Destroy() when done with a client. C++ clients are returned as std::unique_ptr<SynqpayClient> and are released automatically.
Method Reference
| Method | Description |
|---|---|
setLogCallback |
Static. Registers a global callback for the SDK's internal log messages. Not tied to a single client instance — see Logging. |
start / stop |
Starts or stops the client's internal engine. Safe to call repeatedly. |
isRunning |
Returns whether the client engine is currently running. |
connect / disconnect |
Opens or closes the transport connection. Safe to call repeatedly. Fires ConnectionStateCallback on state changes. |
isConnected |
Returns whether the transport is currently connected. |
sendRequest |
Sends a JSON-RPC request string; callback receives the matching JSON-RPC response (or error) once it arrives. Returns an SDK-level error code (0 = sent successfully) — see Errors. |
getErrorMessage |
Returns a human-readable description for an SDK-level error code returned by sendRequest. |
destroy (Java / C#) |
Releases the native client. Required once you're done with a client — see Lifecycle. |
For the lifecycle rules, threading contract, and error handling in more depth, see Key Concepts. For the JSON-RPC methods themselves (pair, authenticate, startTransaction, cancel, ...) and their parameters, see the API reference.