The problem
Traditional AI agents process all input through the LLM:The solution
Iqra AI’s Secure Sessions bypass the AI layer entirely for sensitive input:How it works
DTMF input collection
Use the DTMF Input system tool with encryption enabled:boolean
required
Set to
true for secure data collectionstring
required
Variable to store encrypted value
integer
required
Maximum digits (e.g., 16 for credit cards)
boolean
default:"false"
Require
# key to finish input (recommended)Variable isolation
Mark the variable as hidden from the AI:IsVisibleToAgent: false, the variable:
- Does NOT appear in the LLM system prompt
- Does NOT appear in conversation history
- Does NOT appear in embeddings or RAG context
- Is NOT included in tool call contexts (unless explicitly passed)
Validation without exposure
Pass the encrypted value to your backend for validation:pin_validation_result (“valid” or “invalid”), never the actual PIN.
PCI-DSS compliance flow
Here’s a complete PCI-compliant credit card collection workflow:1
Prompt for card number
2
Collect encrypted input
3
Prompt for CVV
4
Collect encrypted CVV
5
Validate with payment processor
- Decrypts the inputs
- Sends to payment processor (Stripe, Square, etc.)
- Receives token
- Returns token + safe metadata
6
Store token, discard card data
7
Confirm with safe information
The encrypted card data is automatically purged after the session ends. Only the token persists for future transactions.
Security architecture
Encryption layer
WhenEncryptInput: true, Iqra AI:
- Captures DTMF tones directly from the media stream
- Converts tones to digits in-memory (never written to disk)
- Encrypts using AES-256-GCM with session-specific key
- Stores ciphertext in variable
- Clears plaintext from memory immediately
Key management
Encryption keys are:- Generated per-session (ephemeral)
- Rotated every 24 hours for long-running sessions
- Never logged or persisted
- Destroyed when session ends
Decryption handoff
Only your backend can decrypt:Variable visibility matrix
Recommendation: Use
IsVisibleToAgent: false + EncryptInput: true for maximum security.
Common use cases
PIN verification
Social Security Number collection
Credit card payment
See PCI-DSS compliance flow above.Account number lookup
Best practices
Always use encryption for:
- Credit/debit card numbers
- CVV/CVC codes
- Bank account numbers
- Social Security Numbers
- PINs and passwords
- Health record identifiers (HIPAA)
- Any personally identifiable information (PII)
Provide clear instructions
Users aren’t used to entering long numbers via keypad:- Good
- Bad
Set appropriate timeouts
Longer inputs need more time:- 4-digit PIN: 10-15 seconds
- 16-digit card number: 30-45 seconds
- 9-digit SSN: 20-30 seconds
Implement retry logic
Confirm without revealing
- Good
- Bad
Purge after use
Encrypted variables are automatically purged when the session ends, but you can also explicitly clear them:Testing secure sessions
Development mode
During testing, you can log encrypted values to verify collection:Test card numbers
Use standard test cards for validation:- Visa: 4532-1234-5678-9010
- Mastercard: 5425-2334-3010-9903
- Amex: 3782-822463-10005
Mock backend responses
Your Custom Tool can return mock validation during testing:Compliance certifications
Iqra AI infrastructure is designed for:- PCI-DSS Level 1 - Payment card data protection
- HIPAA - Healthcare information privacy
- SOC 2 Type II - Security and availability controls
- GDPR - EU data protection requirements
Your implementation must also be compliant. Use certified payment processors and consult with compliance experts before handling sensitive data.
Next steps
Script nodes
Learn about DTMF Input and other nodes
Action flows
Build validation workflows
Custom tools
Integrate with payment processors
Compliance
Security and compliance documentation