Skip to main content

Client Libraries

Kody provides SDKs for several popular programming languages to simplify integration with the Kody Payments API. These client libraries handle authentication, serialization, and network communication, allowing you to focus on your business logic.


Available Languages

If your preferred programming language is not listed, contact the Kody team to request support for additional languages.


Advantages of Using Client Libraries

  1. Maintained by Kody: Ensures compatibility with Kody's APIs and keeps up-to-date with the latest changes.
  2. Built-In Authentication: Securely interact with Kody APIs using pre-configured mechanisms.
  3. Retry Logic: Automatically retries failed requests for robust communication.
  4. Language-Specific Idioms: Designed to fit the conventions and idioms of each supported language.
  5. Efficient Communication: Uses protocol buffers for optimized HTTP request bodies.
  6. Backward Compatibility: Ensures smooth integration with future API updates.

Protocol versions and SDK releases

New fields in this documentation are annotated with the protocol version that introduced them, for example Available from protocol v1.8.7. The protocol is the .proto contract shared by every language SDK, and its version numbers are the ones you see on the SDK packages.

The language SDKs are released independently and can lag behind the protocol. A field annotated v1.8.7 is only available to you once your language's SDK has been published at that version or later. Check the releases page of your SDK repository before relying on a newly annotated field, and contact the Kody team if you need a language brought up to date.

Protocol changes are additive unless a note says otherwise: existing fields do not change meaning and existing enums do not gain values, so upgrading an SDK does not require code changes.


Implementation Guidelines

  • The SDKs are designed for server-side usage to maintain secure API key handling.
  • Avoid using the SDKs directly in frontend applications to prevent exposing sensitive credentials.

Best Practices

  1. Terminal Readiness: Ensure your terminal is in the proper mode (e.g., "Wait for Orders") before sending payments. Contact Kody support to enable any special terminal features.

  2. Secure API Key: Store your API key securely (for example, using environment variables or a secrets manager) and avoid hardcoding it in your source code.

  3. Idempotency: Use the optional idempotency keys for both payments and refunds to avoid duplicate processing.

  4. Error Handling: Check response statuses and failure reasons for robust error handling.

Test Cards

To make simulated payments in a test store you can open the page Test Cards to access multiple payment methods and also combination of value amounts to create test cases, for both in person terminal payments and online payments.