Skip to main content

Policies and Rules

The policy system allows configuring security rules, limits, and restrictions for PIX operations. Rules are evaluated automatically on each transaction and can block, refund, or notify about violations.

Configuration Hierarchy

Policies follow a three-level hierarchy:

Default (base) -> Tenant (overrides default) -> Account (overrides tenant)

Each level can define specific rules. Values not set at a level are inherited from the level above. This allows having global rules at the default level with per-tenant or per-account adjustments.

PIX Out Rules (Outgoing Transfers)

Rules are evaluated in the order below. The first violation found stops evaluation.

OrderRuleDescriptionAction
1Kill SwitchDisables all outgoing transfersREJECT
2Operating HoursRestricts operations to a time windowREJECT
3WhitelistIf the payee is whitelisted, allows and skips all rules belowALLOW
4BlacklistBlocks if the payee is blacklistedREJECT
5Same OwnershipOnly allows transfers to the same CPF/CNPJREJECT
6Transaction LimitMaximum amount per transferREJECT
7Night LimitReduced maximum between 20:00-06:00 (BRT)REJECT
8Person TypeRestricts by payee type (PF/PJ)REJECT
9ApprovalAbove a threshold, requires manual approvalHOLD_FOR_APPROVAL

PIX In Rules (Incoming Transfers)

For incoming transfers, all violations use the same configurable action (violationAction).

OrderRuleDescription
1WhitelistIf the payer is whitelisted, allows and skips all rules below
2Blacklist (Document)Blocks if the payer is in the CPF/CNPJ blacklist
3Blacklist (Bank)Blocks if the originating bank is blacklisted
4Same OwnershipOnly accepts PIX from the same CPF/CNPJ
5Amount LimitMaximum amount per incoming transaction
6Person TypeRestricts by payer type (PF/PJ)
7Allowed BanksOnly accepts PIX from specific banks

Violation Actions (PIX In)

When a PIX In rule is violated, the configured action is applied:

ActionDescription
ALLOW_AND_NOTIFYAllows the transaction but records the violation (default)
AUTO_REFUNDAutomatically refunds the amount to the payer
QUARANTINEPlaces the transaction in quarantine for N days
BLOCKLocks the balance corresponding to the transaction

QR Code Rules

RuleDescription
Dynamic QREnable/disable dynamic QR code creation
Static QREnable/disable static QR code creation
Max AmountAmount limit per QR code
Min AmountMinimum amount per QR code

PIX Key Rules

RuleDescription
CreationEnable/disable PIX key creation
Max KeysMaximum number of keys per account

Refund Rules

RuleDescription
EnabledEnable/disable refunds
Max AmountAmount limit per refund

MED (Dispute) Rules

RuleDescription
Auto-blockAutomatically lock balance for MEDs above a specified amount
Max RateLimit for the MED/PIX-In ratio
ActionWhat to do when the rate is exceeded: NOTIFY, BLOCK PIX IN, BLOCK PIX OUT, BLOCK ALL

Operating Hours

Restricts all operations to a time window. Supports overnight windows (e.g., 22:00-06:00).

FieldDescriptionExample
startStart time06:00
endEnd time22:00
timezoneTimezoneAmerica/Sao_Paulo

The Whitelist Principle

In both PIX Out and PIX In, the whitelist is evaluated first. If the payer/payee document (CPF/CNPJ) is in the whitelist, all other rules are skipped and the transaction is allowed.

This allows creating exceptions for trusted partners that should not be affected by limits, blacklists, or other restrictions.

Violation Visibility

All policy violations are recorded on the transaction and visible:

  • In the statement (GET /v1/accounts/{accountId}/statement), in the policyViolations and violationAction fields
  • Via policy.violation webhook (when configured)
  • In the admin panel (Backoffice)

See the Disputes (MED) guide for details on MED-specific rules.