--- title: "Implement callbacks with register_device_request" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request" last_modified: "2026-05-23T12:56:20+02:00" language: "en" --- # Implement callbacks with register\_device\_request [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request.md) ## About this task In the C Library integration, some callbacks are part of, and passed with, a `register_device_request`. This includes: * `ped_state_change_CB` * `tender_additional_data_CB` * `tender_print_receipt_CB` * `tender_check_signature_CB` * `tender_progress_CB` * `tender_dcc_CB` * `tender_finished_CB` * `tender_referral_CB` This does not apply to callbacks that are not added to the `register_device_request` structure.  For these callbacks, see [Implement callbacks](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks). We have defined a signature for each callback in the **register\_device\_extern.h** file. The signature we provide looks like: ```cpp void tender_print_receipt_CB(receipts_strct * , ped_device_info * , void * ); ``` You will need to implement callback functions with the same signature.  ## Steps To use these callbacks: 1. Implement the callback. In the following example we will implement the `print_receipt` callback. ```cpp void tender_print_receipt_CB(receipts_strct * status_tender, ped_device_info * ped_state, void * echo_struct){ app_context_t * sPOS = (app_context_t *)echo_struct; //TODO: store the receipts somewhere //ADYLibraryResult result = confirm_print_receipt(sPOS->terminal_id, sPOS->tender_reference, true); } ``` 2. Assign a pointer for `print_receipt_callback`  to `status_tender_print_receipt` in the `callbacks` data structure within the `register_device_request` ```cpp register_device_request_ptr->callbacks.status_tender_print_receipt = tender_print_receipt_CB; ``` 3. When you have populated `register_device_request.callbacks` with each callback, pass `register_device_request` as a parameter of the `register_device` call. ```cpp ADYLibraryResult result = register_device(register_device_request_ptr, register_ped_CB, sPOS); ```