Software development kits make integration simple so you can quickly get products to market
This section provides information about how to set up and use the Expedia Group platform SDK for Python.
Before you can access any API endpoint, you would need to sign up for a partner account using the Expedia Group Console.
In the Console, go to the product catalog and add the Fraud Prevention Service to your partner account. You can then create an API client from the link in the menu and add the product scopes to it. Be sure to save your API client ID and secret to a secure location once it's created.
Your development environment needs to have Python 3.7 or later. You can use any PyPi dependency manager to configure SDK dependencies for your projects.
All API requests must be authenticated using your API client ID and secret. Create a
FraudPreventionV2Client and configure it with your credentials.
fraud_prevention_client = FraudPreventionV2Client( ClientConfig( key="YOUR_KEY", secret="YOUR_SECRET" ) )
(Optional) 4.1. Configure product endpoint URIs
The service client can also be configured with an endpoint and request timeout (in milliseconds) to override the default values.
client_config: ClientConfig = ClientConfig( key=my_key, secret=my_secret, endpoint="URI", request_timeout=10_000 )
Build your request object using the classes defined in the SDK, and use the service client to make the API call using it.
request: OrderPurchaseScreenRequest = OrderPurchaseScreenRequest( ... ) fraud_prevention_client.screen(request)
Need more information? Check out our usage examples.