--- title: "Handle Dynamic Currency Conversion" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/handle-dynamic-currency-conversion-c-library" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/handle-dynamic-currency-conversion-c-library.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/handle-dynamic-currency-conversion-c-library" last_modified: "2026-05-23T12:56:20+02:00" language: "en" --- # Handle Dynamic Currency Conversion [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/handle-dynamic-currency-conversion-c-library.md) ## Implement the DCC callback Implement this `tender_dcc_CB` and assign to the function pointer `status_tender_DCC`. For more information on how to do this, see [Implement callbacks with register\_device\_request](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request). ### Code example ```cpp void tender_dcc_CB(response_header*, ped_device_info*, void * echo_struct) ``` ## Invoke Dynamic Currency Conversion callback Set up `AskDCC` in merchant account settings to invoke the DCC callback. Contact [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable this setting. ## Handle the DCC callback The `tender_dcc_CB` callback presents a currency conversion option to the shopper. This allows the POS to indicate this on the POS screen and to provide the details of the currency conversion option also to the shop agent. ### Parameters | Name | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ped_device_info` | See `ped_device_info` for a description of the `ped_device_info` struct. | | `response_header` | See `response_header` for a description of the `response_header.` `response_header` includes `additional_data_struct` and its returned data elements. indicates the progress state of the transaction in the state data element, which is an enum of type `TENDER_STATE`. In this case it will be `ASK_DCC`. | ## DCC Returned Details The DCC details contain the following keys: | Fields | Description | | ------------------------------- | ------------------------------------------------------------------------ | | `dcc.markup` | The markup percentage (for example, 300 = 3%). | | `dcc.commissionfee` | The commission fee in minor units (for example, 0. Not used currently.). | | `dcc.exchangerate` | The exchange rate (for example, 16178 = 1.6178). | | `dcc.converted.amount.value` | The amount after conversion (for example, minor units). | | `dcc.converted.amount.currency` | The currency after conversion (For example, USD). | | `dcc.org.amount.value` | The original amount in minor units. | | `dcc.org.amount.currency` | The original currency (for example, EUR). | | `dcc.source` | The exchange rate source. | ## Helper functions A function is available to get additional data values from the `additional_data` struct. See `get_additional_data_value` in **additional\_data.h**. The SDK package contains a folder **documentation/log\_files/documentation**. This folder contains log files of actual test runs that relate to the items discussed in this manual. The **dcc\_callback.log** file that shows a live example of the register device call and the related callback.