executeWithApproval
PQSafe AgentPay API Reference v0.1.0
PQSafe AgentPay API Reference / executeWithApproval
Function: executeWithApproval()
executeWithApproval(
signed,request,config?):Promise<PaymentResult>
Defined in: pqsafe/agent-pay/src/approval.ts:893
Execute a payment with optional human-in-the-loop approval gate.
Legacy convenience wrapper — prefer requestApproval + executeAgentPayment for new code.
- amount ≤ autoApproveThreshold → executes immediately (no approval gate)
- amount > autoApproveThreshold → approval gate via configured channels
Parameters
signed
request
config?
Returns
Promise<PaymentResult>
Throws
if approval is rejected
Throws
if approval times out
Throws
if TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID not set when required