delegate-payment

Delegate payment processing authority to agents with configurable limits and controls.

Overview

The hyperfold pay delegate command allows you to grant payment processing authority to your agents. This enables agents to autonomously complete transactions while maintaining strict controls over spending limits, approval thresholds, and permitted operations.

Payment delegation uses Shared Payment Tokens (SPT) to securely authorize agents without exposing sensitive payment credentials. See Shared Payment Tokens for details.

Usage

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Delegate payment authority to buyer agents
$ hyperfold pay delegate --agent=sales-bot-01
Configuring payment delegation...
✓ Agent: sales-bot-01 (negotiator)
✓ Payment Provider: Stripe (acct_abc)
✓ Delegation Mode: per_transaction
DELEGATION CONFIGURED
Max Transaction: $500.00
Daily Limit: $10,000.00
Requires Approval: > $200.00
Token Scope: charge_card, refund
Delegation token created: del_xyz789
Agent can now process payments within defined limits.

Options

OptionDescription
--agentAgent ID to delegate to (required)
--max-transactionMaximum single transaction amount (default: $500)
--daily-limitMaximum daily transaction volume (default: $10,000)
--approval-thresholdTransactions above this require human approval
--allowed-methodsPayment methods agent can use (card, bank_transfer, etc.)
--customer-segmentsRestrict to specific customer tiers
--valid-fromStart date for delegation (ISO 8601)
--valid-untilExpiration date for delegation (ISO 8601)
--business-hours-onlyRestrict to configured business hours

Examples

Advanced Configuration

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Configure advanced delegation with custom limits
$ hyperfold pay delegate \
--agent=premium-sales-bot \
--max-transaction=1000 \
--daily-limit=50000 \
--approval-threshold=500 \
--allowed-methods=card,bank_transfer
# Delegate with time restrictions
$ hyperfold pay delegate \
--agent=sales-bot-01 \
--valid-from="2025-01-01T00:00:00Z" \
--valid-until="2025-12-31T23:59:59Z" \
--business-hours-only
# Delegate with customer segment restrictions
$ hyperfold pay delegate \
--agent=vip-sales \
--customer-segments=gold,platinum \
--max-discount=25%

Managing Delegations

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# List all active payment delegations
$ hyperfold pay delegate list
ACTIVE PAYMENT DELEGATIONS
AGENT PROVIDER MAX TXN DAILY LIMIT STATUS
sales-bot-01 Stripe $500 $10,000 active
premium-sales Stripe $1,000 $50,000 active
fulfillment-01 Stripe $100 $5,000 active (refunds only)
# View detailed delegation info
$ hyperfold pay delegate show sales-bot-01
DELEGATION: sales-bot-01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Agent: sales-bot-01
Type: negotiator
Provider: Stripe (acct_abc)
Created: 2025-01-15T10:00:00Z
LIMITS
Max Transaction: $500.00
Daily Limit: $10,000.00
Monthly Limit: $250,000.00
Approval Above: $200.00
PERMISSIONS
✓ charge_card
✓ refund_partial
✓ create_payment_intent
○ refund_full (requires approval)
○ dispute_respond (requires approval)
USAGE (30 days)
Transactions: 1,247
Volume: $187,450.00
Avg Transaction: $150.28
Refunds: 23 ($3,120.00)

Revoking Access

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Revoke payment delegation
$ hyperfold pay delegate revoke sales-bot-01
⚠ This will immediately revoke payment authority for sales-bot-01
Confirm revocation? [y/N] y
✓ Delegation revoked
✓ Active transactions will complete
✓ New transactions blocked
# Revoke with pending transaction handling
$ hyperfold pay delegate revoke sales-bot-01 \
--cancel-pending \
--reason="Agent decommissioned"

Delegation Workflow

When an agent with payment delegation processes a transaction:

1. Transaction Initiated

Agent initiates payment using its delegation token. The token contains encrypted limits and permissions.

2. Validation

Hyperfold validates the transaction against delegation limits, daily caps, and any segment restrictions before forwarding to the payment provider.

3. Approval Check

If the amount exceeds the approval threshold, the transaction is held pending human review via webhook or dashboard notification.

4. Processing

Approved transactions are processed through the configured payment provider. The agent receives real-time status updates.

Always set conservative limits initially and adjust based on agent behavior. Monitor the Billing Dashboard for delegation usage patterns.
Next: Configure Wallet Management for agent payment orchestration.