Skip to main content

Block Rules & Fraud Prevention

Block rules stop checkouts and payments from matching IPs, emails, PAN/BIN patterns, specific customers, or payment IDs. Rules use an AND / OR operator across the criteria you set.

Create a block rule

await tagada.blockRules.create({
  name: 'Temp BIN + email pattern',
  operator: 'OR',
  bin: '424242',
  emailRegex: '.*@disposable\\.example',
  isPermanent: false,
  ttlHours: 24,
});
Use OR when any single signal should block; use AND when all filled criteria must match.

Rule criteria reference

FieldMatches
ipAddressExact IPv4/IPv6
emailExact email
emailRegexEmail pattern (regex string)
binCard BIN (typically 6 digits)
binRegexBIN pattern
panFull or partial PAN (exact)
panRegexPAN pattern
customerIdSpecific customer ID
paymentIdSpecific payment ID
Additional flags include autoCreated, metadata, isPermanent, and ttlHours.

Temporary vs permanent blocks

// Expires after 24 hours
await tagada.blockRules.create({
  name: 'Cooling off',
  operator: 'OR',
  ipAddress: '203.0.113.10',
  isPermanent: false,
  ttlHours: 24,
});

// No expiry
await tagada.blockRules.create({
  name: 'Permanent email block',
  operator: 'OR',
  email: 'abuse@example.com',
  isPermanent: true,
});
ttlHours is only meaningful when isPermanent is false. Allowed range is 1–8760 hours.

List, retrieve, update, delete

const list = await tagada.blockRules.list();

const rule = await tagada.blockRules.retrieve('rule_...');

const updated = await tagada.blockRules.update('rule_...', {
  data: {
    name: 'Renamed rule',
    emailRegex: '.*@spam\\.test',
  },
});

await tagada.blockRules.del('rule_...');
The list endpoint accepts pagination and filters via the HTTP API (pagination, sortBy, filters); the SDK currently posts an empty body for list() — extend the call if you pass a typed body through your integration.

SDK methods reference

MethodDescription
tagada.blockRules.list()List rules for the authenticated account
tagada.blockRules.create(params)Create a rule (BlockRuleFormSchema-shaped fields)
tagada.blockRules.retrieve(id)Fetch one rule
tagada.blockRules.update(id, { data })Partial update (data uses the same fields as create)
tagada.blockRules.del(id)Delete a rule

Next steps

Payments

Process and route payments after hardening with block rules

Customer management

Tie blocks to customerId and customer-level review

Checkout sessions

Share checkout links and monitor async payment status

Funnel orchestrator

Routing and conditions alongside fraud controls