Skip to main content
This guide covers how to manage policies and handle approval workflows using the DFNS API and SDK.

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:
Handle approval 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 in approvers:
The group has a quorum of 1 and includes both the service account and human approvers. The service account evaluates the transaction first. If it approves, the quorum is met and the transaction proceeds. If the service account can’t approve, it notifies a human to review and approve instead. Either way, every approval decision is recorded with full accountability.
A service account rejection denies the entire approval. Design your automation to abstain rather than reject when unsure. Notify a human approver and let them make the call within DFNS. This preserves the audit trail and non-repudiation.

Processing approvals as a service account

Use webhooks to react to pending approvals in real time. When a policy.approval.pending event arrives, the service account evaluates the transaction. If it passes, the service account approves. Otherwise, it notifies a human to review:

Policies API

Complete API reference

Approvals API

Approval management API

Policies concept

Understanding policies

Set up webhooks

Event notifications
Last modified on June 8, 2026