fraud_protection

Description

A fraud protection is a configuration of your fraud protection controls such as minFraud which allow you to set thresholds for when a transaction should be rejected based on the information known about the customer placing the order. We currently support MaxMind's minFraud, Google reCAPTCHA, as well as your own Pre-Payment Webhook.

To create a fraud protection, POST to the fraud_protections link relationship of a store. To enable that fraud protection on a payment method set, POST to the payment_method_set_fraud_protections link relationship using the self link relationship from this resource as the fraud_protection_uri.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a fraud_protection
PATCH
Update a fraud_protection (send only the properties you want to modify)
PUT
Replace a fraud_protection (send the entire representation)
DELETE
Delete a fraud_protection
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
type The type of this fraud protection String Required. Either minfraud, google_recaptcha, or custom_precheckout_hook.
description Description of this fraud protection String 100 characters or less, will default to Default Min Fraud.
json Configuration settings for some fraud protection systems. JSON Required for google_recaptcha and custom_precheckout_hook.
score_threshold_reject The score threshold used for minfraud. This should be set between 0 and 100. 0 will disable minFraud and 100 will turn it on for logging but still allow all transactions to go through. Integer Optional (0 to disable)
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

json Properties for Google ReCAPTCHA as of 2017-08-30

Property Description Type Constraints
config Determines how reCAPTCHA is configured to operate. String Required. disabled, enabled_always, or enabled_by_errors
private_key Your Google reCAPTCHA Private Key String Required if using a custom subdomain, empty otherwise.
site_key Your Google reCAPTCHA Site Key String Required if using a custom subdomain, empty otherwise.

json Properties for Pre-Checkout Hook as of 2017-08-30

Property Description Type Constraints
enabled Whether or not the Pre-Checkout Hook is enabled. Boolean true or false, 1 or 0.
url Url of your Pre-Checkout Hook String Required.
failure_handling If your Pre-Checkout Hook is unavailabe for some reason, this setting determines if the checkout should be rejected or approved. String Required. reject or approve

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api-sandbox.foxycart.com/fraud_protections/2",
            "title": "Google reCAPTCHA"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:payment_method_sets": {
            "href": "https://api-sandbox.foxycart.com/stores/8/payment_method_sets",
            "title": "Payment Method Sets for this store"
        }
    },
    "type": "google_recaptcha",
    "description": "Google reCAPTCHA",
    "json": "{\"private_key\":\"\",\"site_key\":\"\",\"config\":\"disabled\"}",
    "score_threshold_reject": 0,
    "date_created": "2015-05-27T08:59:54-0700",
    "date_modified": "2015-05-27T08:59:54-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/fraud_protections/2" rel="https://api.foxycart.com/rels/fraud_protection">
  <link rel="self" href="https://api-sandbox.foxycart.com/fraud_protections/2" title="Google reCAPTCHA"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/payment_method_sets" href="https://api-sandbox.foxycart.com/stores/8/payment_method_sets" title="Payment Method Sets for this store"/>
  <type>google_recaptcha</type>
  <description>Google reCAPTCHA</description>
  <json>{"private_key":"","site_key":"","config":"disabled"}</json>
  <score_threshold_reject>0</score_threshold_reject>
  <date_created>2015-05-27T08:59:54-0700</date_created>
  <date_modified>2015-05-27T08:59:54-0700</date_modified>
</resource>
{
    "class": [
        "fraud_protection"
    ],
    "properties": {
        "type": "google_recaptcha",
        "description": "Google reCAPTCHA",
        "json": "{\"private_key\":\"\",\"site_key\":\"\",\"config\":\"disabled\"}",
        "score_threshold_reject": 0,
        "date_created": "2015-05-27T08:59:54-0700",
        "date_modified": "2015-05-27T08:59:54-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/fraud_protections/2"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/payment_method_sets"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8/payment_method_sets"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.