Skip to main content
The IRemoteDCCService interface provides seven methods for managing the DCC transaction lifecycle. The following table summarizes the available methods. Expand each method below for a full description and code example.
Call init() with the DHS base URL before calling any other method. The DCC app establishes the connection to the Fexco DHS and returns the result via DccInitCallback. See Environments for the correct URL for your environment.
Use getDccOffer() to check DCC eligibility before displaying the cardholder choice screen. If the call succeeds and a DCC offer is available, pass the returned DccOffer to getDccChoice().The timeoutInMilliseconds parameter controls how long the SDK waits for a network response. The example uses 10,000 milliseconds (10 seconds).
Use getDccRate() for top-up and completion transactions where the latest exchange rate for a known foreign currency is required. Provide the ISO 4217 three-letter currency code in the transaction object (for example, USD or EUR). See Currency codes for a reference.
Use getDccChoice() after a successful getDccOffer() call. Pass the DccOffer from the offer callback and a timeout, in milliseconds, that controls how long the choice screen stays open before it closes automatically.
Call notifyPaymentComplete() after every transaction, regardless of the authorization result. This method sends analytics data to Fexco and does not affect the payment outcome.
Use getDccReceiptString() to get the DCC receipt text after a transaction. Pass the transaction type as a string using TransactionType.name and the foreign currency alpha code.Supported transaction types are SALE, REFUND, COMPLETION, and PREAUTH. All other transaction types return an empty string.
The dccReceiptString field on DccChoice is still populated for backward compatibility, but it always returns sale receipt text regardless of transaction type. Use getDccReceiptString() for all new integrations.
Use cancel() to stop the current interaction with the DCC app at any point. Any active callback receives an error with the reason "Canceled".