C library integration

Use the C Library integration to allow communication between your POS application, terminal, and the Adyen platform. Register the POS app and terminal, make calls and receive callbacks, and review enums for their state and result.

C library transaction flow

The transaction flow is:

  1. Initialize the library (init_task)
  2. Register the POS (register_app)
  3. Register the PED (register_device)
  4. Start a transaction (create_tender) -  this step can be repeated as many times as required
  5. Exit the library (exit_task)

Architecture Diagram

Calls and callbacks

The library handles calls asynchronously. Calls return directly and the system returns results in the form of callbacks. All calls to the library are non-blocking.

Because the library processes asynchronously, and callbacks are required to get additional info from the attendant, a number of callback routines must be specified. The library returns these callbacks to the above calls whenever additional input is required.

These callbacks are:

  • library initialization callback
  • register the POS callback
  • register the PED callback
  • create_tender callback
  • additional data callback
  • confirm receipt callbacks
  • confirm signature callback
  • progress event callback
  • final transaction result callback
  • library exit callback

ENUMS

The library represents results, states and other fixed values using enums. The adyen_enum.h file contains these enums. Helper functions are available to convert strings to enums and enums to strings.

The POS App should use the enumerated values instead of the underlying values. For example, if a value of an enum should be stored to disk, store the string and not the integer value.

Questions

Can't find something you are looking for? Look at our FAQ for answers or send an email to support.