Overview
When a cardholder performs an online transaction that requires OOB verification, UTGL generates a secure, time-sensitive approval URL. This URL is delivered to your webhook endpoint, allowing you to present it to the cardholder within your application. After the cardholder completes the verification, a terminal webhook event communicates the final outcome.Key Benefits
- Enhanced Security - Reduces fraud and chargebacks through cardholder verification
- Regulatory Compliance - Meets Strong Customer Authentication (SCA) requirements
- Seamless UX - In-app approval flow keeps users within your application
- Real-time Updates - Webhook events provide immediate status notifications
How OOB Works
The OOB (Out-of-Band) flow involves multiple parties working together to verify the transaction:Transaction Lifecycle
- Transaction Initiation - Cardholder initiates an online payment
- OOB Detection - UTGL system determines if OOB verification is required
- Challenge Initiated - Approval URL generated and sent via webhook
- User Verification - Cardholder reviews and approves/declines on secure page
- Completion - Terminal webhook sent with final outcome
Webhook Events
The OOB integration uses four webhook events to manage the complete transaction lifecycle:Integration Guide
Prerequisites
Before integrating OOB, ensure you have:- Webhook endpoint configured - Secure HTTPS endpoint to receive events
- Webhook signature verification - Validate incoming webhook requests
- Event processing system - Handle webhook events reliably
- User interface - Way to present approval URL to cardholders
Step 1: Handle Challenge Initiated Event
When a transaction requires OOB verification, you’ll receive achallenge.initiated webhook event.
Event Structure
Event Data Fields
Webhook Handler Example
Step 2: Present Approval URL to Cardholder
Upon receiving thechallenge.initiated event, you must present the approval URL to the cardholder. The URL must be opened in a secure context where the cardholder can review transaction details and make a decision.
Mobile Application Integration
Recommended: Embedded Web View For the best user experience, load the approval URL within an embedded web view rather than redirecting to an external browser. This keeps users within your application context. iOS Example (SwiftUI):Web Application Integration
For web applications, you can use an iframe or modal overlay:postMessage API
The approval page useswindow.postMessage() to notify your application when the approval process completes. This allows automatic web view closure and seamless user experience.
Message Structure:
succeeded- Cardholder approved the transactiondeclined- Cardholder declined the transactionfailed- Challenge expired or system error occurred
Step 3: Handle Challenge Resolution Events
After a challenge is initiated, the system will send exactly one terminal webhook event indicating the final outcome. Your system must handle all three possible outcomes.Challenge Succeeded
Sent when the cardholder successfully approves the transaction. Event:Challenge Declined
Sent when the cardholder actively declines the transaction. Event:Challenge Failed
Sent when the challenge expires or fails due to a system error. Event:
Action: Inform the cardholder and provide option to retry the transaction.
Complete Webhook Handler
Best Practices
Security
- Verify Webhook Signatures - Always validate incoming webhook requests using the signature header
- HTTPS Only - Use HTTPS for all webhook endpoints
- Origin Verification - When listening for
postMessage, always verify the origin ishttps://approve.utgl.io - Time-Sensitive URLs - Present approval URLs immediately; they expire in 5 minutes
User Experience
- Embedded Web Views - Use embedded web views instead of external browser redirects
- Loading States - Show loading indicators while waiting for approval
- Error Handling - Provide clear error messages and retry options
- Automatic Closure - Use
postMessageto automatically close web views after completion
Reliability
- Idempotency - Use event
idfield to prevent duplicate processing - Event Logging - Log all webhook events for debugging and audit trails
- Retry Logic - Implement retry logic for failed webhook deliveries
- Status Tracking - Track challenge state to handle edge cases
Performance
- Immediate Presentation - Present approval URL as soon as webhook is received
- Async Processing - Process webhooks asynchronously to respond quickly
- Connection Pooling - Reuse HTTP connections for webhook processing
Challenge Lifecycle States
Understanding the challenge lifecycle helps you handle edge cases: State Transitions:- Initiated → Succeeded: Cardholder approves within timeout window
- Initiated → Declined: Cardholder actively declines
- Initiated → Failed: 5-minute timeout expires or system error occurs
One Terminal Event: Each challenge will result in exactly one terminal event (
succeeded, declined, or failed). Your system should handle all three outcomes.Troubleshooting
Common Issues
Debugging Tips
- Log All Events - Log incoming webhook events with timestamps and event IDs
- Track Challenge State - Maintain state mapping between
cardAccountIdand challenge status - Monitor Expiration - Track
expiresAttimestamps to identify timing issues - Test Webhook Delivery - Use webhook testing tools to verify endpoint accessibility
Testing
Test Mode
In sandbox/test mode, you can test the OOB flow:- Initiate Test Transaction - Create a transaction that triggers OOB verification
- Receive Webhook - Verify
challenge.initiatedwebhook is received - Present URL - Load approval URL in test environment
- Complete Challenge - Approve or decline to test different outcomes
- Verify Terminal Event - Confirm terminal webhook is received
Test Scenarios
- Successful Approval - Complete approval flow and verify
challenge.succeededevent - User Decline - Decline transaction and verify
challenge.declinedevent - Timeout - Wait for expiration and verify
challenge.failedwithexpiredcode - Network Issues - Test behavior when webhook delivery fails
Next Steps
- Review Webhook Events for complete event reference
- Learn about Webhook Security for signature verification
- Understand Idempotency for reliable event processing
- Explore the API Reference for transaction endpoints

