fraud_protections

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

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 list of fraud_protections
POST
Create a new fraud_protection
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:fraud_protections": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/fraud_protection">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: 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.