Skip to main content
These recipes provide ready-to-use approval workflows for financial operations, designed with compliance and security in mind.
  • Refund Processing
  • Wire Transfers
  • Payment Processing
  • Credit Limit Changes

Refund Processing

Enable safe refund processing with automatic approvals for small amounts and required oversight for larger refunds.
const processRefund = needsHumanApproval({
  type: 'sync',
  title: 'Refund Request',
  ask: (args) => `Approve refund of $${args.amount} for order ${args.orderId}?`,
  autoApprove: async (args) => args.amount < 100
})

// Usage
await processRefund({
  orderId: '1234',
  amount: 150,
  reason: 'Defective product'
})
  • Customer refund requests
  • Order cancellations
  • Service credits
  • Complaint resolutions
  • Set appropriate auto-approval thresholds
  • Include order context
  • Maintain audit trail
  • Consider customer history

Next Steps