This product is available by invitation only. General availability is coming soon. Fill out this form to indicate interest.

Getting Started with Expedia’s Fraud Prevention

Welcome to Expedia’s Fraud Prevention! Please use the following guide to set up your integration.

Our fraud screen capabilities screen multiple types of traveler interactions and partner processing interactions. Here's a high level flow of how partner interactions and traveler interactions are screened by use case, and supporting SDK reference can be found here:

You're all set to integrate! Please use the following guide to set up your integration:

What You'll Need:

  1. TrustWidget
  2. Download the Open World Platform SDK and Authenticate

Trust Widget

The Trust Widget is lightweight, non-blocking JavaScript that collects user device data as the user navigates through the check out process. The data collected by the Trust Widget is used alongside the Booking Screen API to help make a Fraud decision.

High Level Integration Flow

Trust Widget JavaScript Context

For the Trust Widget to accurately collect device information, it must fulfill the following requirements:

  1. The Trust Widget must be placed on the page that collects payment information before the reservation is made.
  2. The Trust Widget must be placed in the header of the JavaScript, with the async attribute.

We recommend using a CDN to setup a reverse proxy, so that the client loads the script from the first party partner domain, and the Trust Widget is fetched from behind the scenes.

Partner ID (PID): Your partner ID will be communicated to you by Fraud Prevention Support.

There are two separate URLs that should be used, depending on the environment for reverse proxy configuration (integration or try playground vs live site).

Partner Playground: https://trust-lab.expedia.com/trustService/getTrustWidget?pid=%PID%

Partner Live Site : https://trust.expedia.com/trustService/getTrustWidget?pid=%PID%

Note: the PID should not be exposed at the page load and should be added by reverse proxy.

Example:

If the partner domain is <www.mysurfshop.com>, the client should load the script on the webpage as <www.mysurfshop.com/trustService/getTrustWidget?pid=%PID%>.

The CDN cname should be updated to trust-lab.expedia.com for the lab environment or trust.expedia.com for the production environment and ?pid=<PID> should be appended to the URL. This reverse proxy setting enables mysurfshop.com to load the Trust Widget file from the Expedia.com domain and run as a 1st party to <mysurfshop.com>.

<html>
    <head>
        <script type="text/javascript">
            //Client side functions
            //...
            function getSessionIdViaJs() {
                return "MY_SESSION_ID_FROM_JS";
            }
        </script>
        <script type="text/javascript">
            var trustApi = trustApi || {};
            trustApi.clientConfiguration = {
                "webSessionProviderMethod": "JS",
                "webSessionProviderMethodParam": "return getSessionIdViaJs()",
                "placement": "PURCHASE",
                "placementPage": "1",
                "reportingSegment": "www.expedia.com"
            }

            function submitMyForm() {
                // ...
                var twPayload = trustApi.getTrustPayload();
                // ... add twPayload to your server request
                // ...
            }
        </script>
        <script async src="https://yourdomain.com/trustService/getTrustWidget?pid=1001" />
    </head>
    <body>
        <!-- ... -->
        <form onSubmit="submitMyForm">
            <!-- ... -->
        </form>
    </body>
</html>

You are now ready to start integration with Expedia’s Fraud Prevention! Reference documentation can be found here

If you have any questions regarding the product or need help with your integration, please visit the Frequently Asked Questions page for contact information.

Open World Platform SDK

Please refer to this section to get informed on how to set up EG Partner Account and use Open World platform SDK.

Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve Developer Hub!