Getting started with the Fraud Prevention SDK for Node.js
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 Fraud Prevention SDK for Node.js
1. Sign up for a partner account
Before you can access any API endpoint, you need to sign up for a partner account using the Expedia Group Console.
2. Create API credentials
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 is created.
3. Set up a Node.js development environment
Your development environment needs to have Node.js 16 or later. You can use any dependency manager to configure SDK dependencies for your project in your package.json
file
package.json
{
"dependecies": {
"@expediagroup/fraudpreventionv2-sdk": "latest"
}
}
4. Create a service client and configure credentials
All API requests must be authenticated using your API client ID and secret. Create a FraudPreventionV2Client
and configure it with your credentials.
let fraudPreventionV2Client = new FraudPreventionV2Client({
key: "KEY",
secret: "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.
let request = new OrderPurchaseScreenRequest({ })
Need more information? Check out our usage examples.