Prerequisites
- Service account or authenticated user with policy management permissions
- DFNS SDK installed and configured
- Understanding of policies
Creating a policy
Create a policy that requires approval for large transactions:Policy rule types
Transaction amount limit
Trigger when a single transaction exceeds a threshold:Transaction amount velocity
Trigger when total transaction value exceeds a limit within a time window:Transaction count velocity
Trigger when transaction count exceeds a limit within a time window:Recipient whitelist
Trigger when recipient is NOT in the whitelist:Always trigger
Trigger on all matching activities:Policy actions
Request approval
Require human approval before proceeding:Block
Block the activity entirely:Policy filters
Apply policies to specific wallets using tags:Listing policies
Get all policies:Updating a policy
Update an existing policy:Deleting a policy
Delete a policy:Working with approvals
Listing pending approvals
Get approvals awaiting action:Getting approval details
Get details for a specific approval:Submitting an approval decision
Approve or reject a pending approval:The user or service account submitting the decision must be listed in one of the approval groups defined in the policy. The initiator cannot approve their own transactions by default. Service accounts can submit decisions when
serviceAccountsCanApprove is enabled on the group.Webhook notifications
Subscribe to policy events:Example: Multi-tier approval
Create a policy with multiple approval tiers:Automated approvals with service accounts
Service accounts can participate in approval groups, enabling automated approval workflows. For example, a compliance service that checks transactions against internal rules before approving.This feature requires activation by DFNS staff on your organization. Contact our to enable it.
Setting up the policy
Create a policy with a service account in an approval group. The service account must be explicitly listed inapprovers:
Processing approvals as a service account
Use webhooks to react to pending approvals in real time. When apolicy.approval.pending event arrives, the service account evaluates the transaction. If it passes, the service account approves. Otherwise, it notifies a human to review:
Related documentation
Policies API
Complete API reference
Approvals API
Approval management API
Policies concept
Understanding policies
Set up webhooks
Event notifications