Getting started with the Open World platform SDK for Python
This section provides information about how to set up and use the Open World platform SDK for Python.
1. Sign up for a partner account
Before you can access any API endpoint, you would need to sign up for a Partner account using the Console.
2. Create API credentials
In the console, API endpoints are organized into a catalog of products. In the Product Catalog, search for Fraud Prevention
and add it to your partner account. You can then create an API key and add the Fraud Prevention
product to its scopes.
3. Set up Python development environment
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.
requirements.txt
openworld-sdk-python-fraudprevention
4. Create a service client and configure credentials
All API requests must be authenticated using your API key and secret. Create a FraudPreventionClient
and configure it with your credentials.
fraud_prevention_client = FraudPreventionClient(
ClientConfig(
key="YOUR_KEY",
secret="YOUR_SECRET"
)
)
5. Build request object and make API calls
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)
You can find usage examples here