--- title: "Register the application with Adyen" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/register-the-application-with-adyen-c-library" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/register-the-application-with-adyen-c-library.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/register-the-application-with-adyen-c-library" last_modified: "2019-05-21T12:10:00+02:00" language: "en" --- # Register the application with Adyen [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/register-the-application-with-adyen-c-library.md) Before using the POS systems and connected PEDs to process transactions on the Adyen payments platform, you must authenticate and authorize the POS system and the PED with the Adyen payments platform (at least once). Register the POS by making a call to the library with input parameters and processing the callbacks that are returned by the library after registration has been processed. The POS can then authenticate and authorize any connected PED. After you authenticate and authorize each POS and PED, they are registered in your [Customer Area](https://ca-live.adyen.com/). The call and the callback are asynchronous to prevent the call from blocking the calling thread. The merchant account, user id and password that are required to authenticate and authorize the POS are provided by Adyen when the required accounts are being set up. ## Implement the callback Implement the `register_app_CB` and pass this as a parameter of the `register_app` call. For more information on how to do this, see [Implement callbacks](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks). ### Code example The callback function declaration is: ```cpp void register_pos_CB(register_app_response * result, void * echo_struct) ``` ## Allocate request structure Use `register_app_allocate` to allocate memory for an `register_app_request` structure. Populate the request by performing string duplication and filling heap allocated strings. If you want the data for later use, retain it, or it will be released automatically. ## Call the register\_app Function Call the `register_app` function with the provided parameters to authenticate and authorize the POS. ### Parameters | Name | Type | Required | Description | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `register_app_request_ptr` | [register\_app\_request](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/structs/register_app_request) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Pointer to the `register_app_request` struct, this struct contains all the input parameters for this call. | | `register_app_CB` | Function | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Pointer to the callback function the system returns to the POS with the results of the `register_app` call. | | `echo_struct` | Struct: [echo\_struct](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/structs/echo_struct) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Pointer to a user-defined struct that is echoed back in the callback. Use echo\_struct to share a POS data struct between the call to the library and the callback from the library in response to the call. | ### Code example The declaration of the call to register the POS is: ```cpp ADYLibraryResult register_app_result = register_app(register_app_request_ptr, register_pos_CB, &state); ``` ## Get the function call result `ADYLibraryResult` is used to store the result of the function call, the immediate response to the call. This is an enum that indicates if the system received the request. Should be `ADYEN_OK`, if this is not the case, something has gone wrong. In this case, check the input to the call and if it cannot be resolved, log the result and contact [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) This is not the final result of the call. The library returns the final result in response to the library initialization call. ## Handle the callback The POS needs to wait for the `register_pos_cb` to happen, before it can continue with other functions, like boarding the PED device and performing transactions. ### Parameters The callback passes the following parameters: | Value | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `register_app_response` | Response to the `register_app_request`. The `register_app_response` struct page lists included data elements. | | `echo_struct` | Pointer to a user-defined struct that is echoed back in the callback. Use echo\_struct to share a POS data struct between the call to the library and the callback from the library in response to the call.Pointer to a User defined struct that is echoed back in the callback. Use echo\_struct to share a POS data struct between the call to the library and the callback from the library in response to the call. |