Skip to content

Create an IP range rule

POST
/v1/merchants/{merchant_id}/projects/{project_id}/fraud-prevention/rules/ips/

Blocks payments of customers whose IP address is in this range.

Authorization

apiKey
headerAuthorizationBasic <token>

HTTP Basic authentication with your API key as the username and an empty password.

Path Parameters

merchant_id*string

The ID of the merchant, or self for the merchant of your API key.

project_id*string

The ID of the project.

Request Body

application/json
  1. body

Blocks customer IP addresses in a range.

cidr*string

An IPv4 or IPv6 address or range, in CIDR notation.

Response Body

The rule is created.

application/json
  1. response

Blocks customer IP addresses in a range.

rule_id?string

The ID of the rule.

cidr*string

An IPv4 or IPv6 address or range, in CIDR notation.

curl -X POST 'https://api.example.com/v1/merchants/b8a1c2d4-1234-4c5d-9e8f-0123456789ab/projects/c5078bef-f741-4f26-a13f-26e7916bb00c/fraud-prevention/rules/ips/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "cidr": "192.0.2.0/24"}'
{  "rule_id": "string",  "cidr": "string"}