Policy Behavior

If the system is not paused, the function will start processing each policy against the transaction. For each policy, the function executes the policy and then updates the action based on the result of the policy execution.

The resulting actions can be either:

  • Allow: Let the transaction through
  • Notify: Let the transaction through but send a notification to the customer email or webhook
  • Block: Block the transaction and notify the customer via email or webhook
  • Flag: Block the transaction and request additional confirmation from the customer via email or webhook

If an error occurs during the execution of a policy, or if a policy blocks the transaction, the function will stop processing the rest of the policies and update the resulting action accordingly.

After all policies are processed, the function will finalize the resulting action based on the policy results and the action updates. If a policy resulted in an error, the function will block the transaction and set the alertType to blocked.

Finally, the function returns the resulting transaction action.

Noop Calls

If a secondary noop transaction is provided in the transaction request payload, AND if the policy recommends the transaction to be blocked, the noop transaction is submitted instead to avoid blocking future transactions with higher nonces. This is useful for high transaction throughput flows using the policy engine.


If an invalid policy condition or invalid Noop is detected during the policy execution process, the function will block the transaction, set the alertType to blocked, and add an appropriate violation to the resulting action.