Risk lists
Create named lists of values, such as BINs, emails, or customers, use them in rule conditions, and manage them in the dashboard or the API.
A risk list is a named collection of values that rule conditions match against with the is in list and is not in list operators. Instead of adding each value as its own condition, you keep the values in one list and reference it from any rule.
For example, to block charges from 50 card BINs, add the BINs to one list and reference it in a single Block rule. When the BINs change, you update the list, and the rule stays the same.
When to use risk lists
Use a risk list when:
- A condition has many possible values, such as a set of BINs or issuer countries.
- More than one rule checks the same values.
- You want to change the values without editing the rules.
For a single value, set it on the condition with the equals operator instead.
List types
A list's type sets which values it holds and which rule fields it works with. A Custom list works with any text field.
| Type in the dashboard | API type | Values |
|---|---|---|
| Billing Addresses | billing_address | Billing addresses |
| BINs | bin | Card BINs, the first 6 digits of the card number |
| Cardholder names | card_name | Names on the card |
| Custom | custom | Any text |
| Customer reference IDs | customer_id | Your customer_reference_id values |
| Emails | email | Email addresses. Pay.com stores them in lowercase. |
| Email domains | email_domain | Domains only, such as example.com |
| IP Addresses | ip_address | IPv4 or IPv6 addresses |
| Issuer countries | issuer_country | Two-letter country codes, such as US |
| Phone numbers | phone_number | Phone numbers. Pay.com keeps the digits only. |
| Not offered | card | Cards, added by pm_card_ or tok_card_ ID |
| Not offered | bank_account | Bank accounts, added by bank account payment method ID, such as pm_us_bank_account_… |
Pay.com also provides built-in lists. The card blacklist blocks cards, the bank account blacklist blocks bank accounts, the blocked customers list holds customers to block, and Excluded from block rules holds customers your Block rules skip. See Blocked payments.
Create a risk list
Create the list in the Pay.com dashboard, then add its values.
- 1
Open the risk lists page
Go to Rules → Risk Lists in the Pay.com dashboard and click Create List.
- 2
Name the list and choose a type
Give the list a name of up to 100 characters, such as "Blocked BINs". Then select the Type that matches the values you'll add.
- 3
Add values
Open the list and click +. Type the values, separated by commas or new lines, or upload a TXT file of values. Download sample file shows the format. For a Customer reference IDs list, you can also pick a customer.
Use a list in a rule
Reference the list from any rule condition:
- 1
Open or create a rule
Go to the rule type under Rules, such as Payment, and open a rule or click Create new rule.
- 2
Add a condition with the list operator
Choose the field to match, such as Card BIN. For the operator, choose is in list or is not in list, and for the value, pick a list. The picker shows Custom lists and lists whose type fits the field.
- 3
Save the rule
Click Confirm & Save Rule. Pay.com now matches payments against the list's values.
Manage list values
You can add or remove values at any time. Changes apply right away to every rule that references the list, without editing the rules. The list page shows who added each value and when, and Used in Rules shows the rules that reference it. You can't delete a list that rules use.
Action rules can add values to lists automatically, for example the card of a payment a rule blocked.
Manage lists with the API
The value lists API manages the same lists. Create a list with
POST /v1/value_lists,
with a name, a unique alias, and a type, which defaults to custom.
Then add values with
POST /v1/value_lists/{list_id}/items.
{
"value": "jane.smith@example.com",
"metadata": {
"order_id": "48213"
}
}{
"id": "lsti_296645958265997336",
"resource": "list_item",
"list": "lst_296645958265997335",
"value": "jane.smith@example.com",
"metadata": {
"order_id": "48213"
}
}Some list types check their values:
emailvalues must be valid addresses, and they're stored in lowercase.ip_addressvalues must be valid IP addresses.phone_numbervalues keep their digits only. A value with a comma, a semicolon, or a line break returns400.cardvalues must bepm_card_ortok_card_IDs. Pay.com stores the card itself and adds itsbin,last_four_digits,brand,issuer_country,card_type, andissuer_nameto the item's metadata.bank_accountvalues must be IDs of bank account payment methods on your account, such aspm_us_bank_account_296645958265997316. Pay.com stores the bank account itself and adds itslast4,bank_name,country, andcurrencyto the item's metadata.
Other types accept any text. Adding a value that's already in the list returns
400. For a card or a bank account, that includes another payment method saved
for the same card or account.
| Request | What it does |
|---|---|
GET /v1/value_lists | Lists your lists by page, with page and limit, including the card and bank account blacklists. |
GET /v1/value_lists/{list_id}/items | Lists a list's values, oldest first. Page through them with starting_after or ending_before and has_more. |
PUT /v1/value_lists/{list_id}/items/{item_id} | Changes a value and replaces its metadata. |
DELETE /v1/value_lists/{list_id}/items/{item_id} | Removes a value. |
PUT /v1/value_lists/{list_id} | Renames a list or changes its alias. |
DELETE /v1/value_lists/{list_id} | Deletes a list. |
The aliases pm_card_blacklist, pm_bank_account_blacklist, and
pm_sources_sync are reserved. To manage the blacklists, use their own
endpoints, described in
Block a card and
Block a bank account.
Next steps
- Payment rules: Use lists in rules that block charges or require 3DS.
- Action rules: Add values to lists automatically.
- Rule conditions: The fields a list can match.