Configure redirect URLs to control where users are sent after completing payments, authentication flows, or other interactions with your Devdraft integration. Properly configured redirect URLs ensure seamless user experiences and secure transaction flows.
What are Redirect URLs?
Redirect URLs are predefined endpoints where users are automatically redirected after completing specific actions in your Devdraft-powered applications. They provide seamless user experience by directing users to appropriate pages based on transaction outcomes or user actions.Quick Setup
Configure redirect URLs in under 2 minutes:1
Access Redirect URL Settings
Navigate to App Settings → Redirect URLs in your dashboard
2
Add Redirect URL
Click Add Redirect URL and provide your application URL
3
Configure URL Details
Provide a descriptive name and verify the URL format
4
Test and Activate
Verify your URLs handle redirects correctly
Redirect URL Types
Successful Transaction Redirects:
- Where users go after successful payments
- Include transaction confirmation details
- Show payment receipt or order confirmation
- Enable next steps in user journey
https://yourapp.com/payment/success
Adding Redirect URLs
1
Access Redirect Settings
Navigate to App Settings → Redirect URLs.
2
Create New Redirect
Click Add URL and configure:
- URL destination
- Purpose/description
- Status (Active/Inactive)
3
Test and Save
Verify the URL format and save the redirect configuration.
Managing Redirect URLs
View All Redirects
View All Redirects
Redirect Overview:
- All configured redirect URLs
- Purpose descriptions
- Status and usage statistics
- Creation dates
- Edit redirect destinations
- Enable/disable redirects
- Delete unused redirects
- Test redirect functionality
URL Parameters
Transaction Information:Common Parameters:
transaction_id
- Unique transaction identifieramount
- Transaction amountcurrency
- Transaction currencystatus
- Transaction statuscustomer_id
- Customer identifier
Security Considerations
HTTPS Recommended
Use HTTPS URLs for sensitive redirects to protect user data and prevent interception
State Validation
Implement state parameter validation to prevent CSRF attacks in authentication flows
Domain Verification
Only use redirect URLs from domains you own and control to maintain security
Parameter Sanitization
Validate and sanitize all parameters received in redirect URLs before processing
Implementation Examples
Best Practices
1
Plan Your User Flow
Design Considerations:
- Map out complete user journeys for different scenarios
- Consider mobile and desktop experiences
- Plan for error handling and recovery
- Design clear success and failure states
Create wireframes or mockups of your redirect pages before implementing the URLs.
2
Implement Robust Error Handling
Error Management:
- Handle missing or invalid parameters gracefully
- Provide clear error messages and next steps
- Implement fallback redirects for edge cases
- Log errors for debugging and analysis
3
Test All Scenarios
Comprehensive Testing:
- Test success, failure, and cancellation flows
- Verify parameter handling and validation
- Test with different browsers and devices
- Validate security measures and CSRF protection
Always test redirect URLs in staging environments before deploying to production.
Redirect URLs are critical for user experience and security. Ensure they are properly configured, tested, and monitored to provide seamless transaction flows.