Block Rules

Read and change your blocklist, and undo what one AI fraud review blocked in one call.

Your blocklist, the same rules as Settings > Fraud & risk. A payment that matches a rule is refused before any charge is attempted (checkout, POST /charges, POST /subscriptions and every renewal) with a 403 and code blocked. Rules are per mode: a test key reads and writes your sandbox rules. Secret key only: a publishable key gets 403 secret_key_required. Scoped keys need blocklist:read / blocklist:write.

created_by is user, ai (the AI fraud review) or api. group is the AI fraud review that created the rule, and null for rules a person or a key made. Undo everything one review blocked with one call to DELETE /block-rules/groups/:group.

List block rules

Rules, newest first.

GEThttps://paysio.com/api/v1/block-rules

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Query parameters

typestring

email, email_domain, name, phone, ip, country, bin, card, card_brand, card_fingerprint, bank_account, postal_code, address or device

valuestring

Exact value, case-insensitive. Never matches a card_fingerprint rule

created_bystring

ai, user or api

groupstring

Only the rules one AI fraud review created

created_afterinteger

Unix timestamp, inclusive

created_beforeinteger

Unix timestamp, inclusive

limitinteger

1-100, default 10

starting_afterstring

The id of the last rule of the previous page

Add a block rule

The same checks as the dashboard: a valid IP or network, a full name, a device id from a payment, and card and bank rules scoped to one customer. Send an Idempotency-Key header to make a retry safe. 409 resource_conflict when the same rule exists.

POSThttps://paysio.com/api/v1/block-rules

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

typestringrequired

What kind of rule

valuestring

What to block. Required except for card, bank_account and card_fingerprint

card_last4string

type card: the last 4, with card_brand, scoped by match_email or match_name

card_brandstring

type card: visa, mastercard, amex...

routing_numberstring

type bank_account, with account_number

account_numberstring

type bank_account

payment_method_idstring

type card_fingerprint: a saved card used at your business. Blocks that card under any name or email

match_emailstring

The customer a card or bank rule is limited to

match_namestring

Or their name

labelstring

Why, shown on the rule

Retrieve a block rule

One rule.

GEThttps://paysio.com/api/v1/block-rules/:id

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Remove a block rule

Matching payments are allowed again.

DELETEhttps://paysio.com/api/v1/block-rules/:id

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

List one AI review's blocks

Every rule one AI fraud review created. 404 when it created none in this mode.

GEThttps://paysio.com/api/v1/block-rules/groups/:group

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Unblock a group

Remove everything one AI fraud review blocked, in one call. The review then shows those blocks as undone, and block.deleted fires once per rule.

DELETEhttps://paysio.com/api/v1/block-rules/groups/:group

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.