C++ Mascot for XYO.Financial Generated by Gemini and Imagined by Syniol Limited
The official C++17 SDK for the XYO.Financial transaction enrichment API. A valid API key is available from the XYO dashboard.
- A C++17 compiler
- CMake 3.16 or newer
- libcurl
cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure#include <xyo/client.hpp>
#include <iostream>
int main() {
xyo::Client client({"YourAPIKeyFromXYO.FinancialDashboard"});
auto result = client.enrich_transaction({"COSTA PICKUP", "GB"});
std::cout << result.merchant << '\n';
auto bulk = client.enrich_transaction_collection({
{"COSTA PICKUP", "GB"},
{"STRBUKS GREENWICH", "GB"},
});
auto status = client.enrich_transaction_collection_status(bulk.id);
std::cout << xyo::to_string(status) << '\n';
}Requests that fail at the transport layer, return a non-200 status, or contain an invalid response throw xyo::Error. location and address are represented as std::optional<std::string> because the service may return JSON null.
The C++ SDK can be integrated into your project using one of the following methods.
Since this package is currently distributed via source (and not yet hosted on a public remote), you must first build and install it into your local Conan cache:
git clone https://github.com/syniol/xyo-sdk-cpp.git
cd xyo-sdk-cpp
conan create . --build=missingOnce installed locally, you can add the SDK to your dependencies in your project's conanfile.txt or conanfile.py:
[requires]
xyo-sdk-cpp/1.1.0
Then, install it in your project as usual:
conan install . --build=missingInstall the package via vcpkg:
vcpkg install xyo-sdk-cppYou can include the SDK directly in your CMakeLists.txt without pre-installing package managers:
include(FetchContent)
FetchContent_Declare(
xyo-sdk-cpp
GIT_REPOSITORY https://github.com/syniol/xyo-sdk-cpp.git
GIT_TAG v1.1.0
)
FetchContent_MakeAvailable(xyo-sdk-cpp)In your project's CMakeLists.txt, link against the target:
find_package(XYOSDK CONFIG REQUIRED)
target_link_libraries(my_application PRIVATE XYO::SDK)The Client class is thread-safe and can be safely shared across multiple threads. The default built-in CurlTransport manages request handles independently on a per-call basis. If a custom HttpTransport is provided, it must be thread-safe if the Client is used concurrently.
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Copyright © 2025 Syniol Limited.