Server-side Integration
Server-side integration provides complete control over the card rail purchasing flow. By creating orders programmatically, you can implement custom pricing logic, pre-fill user data, track orders in your system, and handle completion events via webhooks.
Server-side Benefits
Enhanced Control
- Create orders with pre-filled amounts, currencies, and destinations
- Restrict payment methods using
paymentChannel
customization - Implement dynamic pricing and promotional logic
- Generate orders based on your internal business rules
Better User Experience
- Skip manual input by pre-populating user information
- Direct users to payment completion with prepared orders
- Provide order tracking and history in your application
Business Intelligence
- Track order creation and completion rates
- Analyze conversion funnels and user behavior
- Integrate with your existing analytics and reporting systems
Operational Efficiency
- Handle order completion events automatically via webhooks
- Reconcile payments with your internal systems
- Automate post-purchase workflows
Integration Guides
Basic Integration
Get started with simple order creation using minimal required parameters.
Payment Method Customization
Restrict payment methods and customize the payment experience for users.
Advanced Features
KYC import, external tracking, and comprehensive user data pre-filling.
Get Order Information
Learn how to retrieve order information and track status from the Swipelux API.
Webhooks
Handle real-time order status updates and completion events with webhooks.
Implementation Flow
1. Order Creation
Create orders server-side with all necessary parameters:
2. User Redirection
Direct users to complete payment using either:
Payment Link: Direct browser redirect
Widget Integration: Embedded widget with order token
3. Event Handling
Receive real-time updates via webhooks:
Security Considerations
- API Keys: Store secret API keys securely, never expose them in client-side code
- Webhook Verification: Verify webhook signatures to ensure authenticity
- Order Validation: Validate order parameters before processing
- Error Handling: Implement proper error handling for API failures
Next Steps
Once you have server-side integration working:
- Set up comprehensive webhook handling for order events
- Implement order tracking for user-facing status updates
- Consider KYC import for returning users