Skip to main content
This guide provides Affelios-specific best practices for building high-performance integrations. These recommendations are optimized for industries like iGaming and Trading where real-time customer creation and efficient transaction processing are critical.

Instant Customer Creation

Create Customers at Registration/Purchase

Immediate Customer Creation

Create customers in Affelios immediately when users register or make their first purchase to ensure proper attribution and tracking.
Attribution Benefits:
  • Ensures all user actions are properly attributed to affiliates
  • Prevents loss of conversion data during user journey
  • Enables real-time commission calculations
  • Provides immediate tracking link validation
User Experience:
  • Seamless integration without user awareness
  • No delays in affiliate tracking
  • Immediate access to affiliate benefits

Batched Transaction Processing

Optimize for High-Volume Industries

Batched Operations for High-Volume Industries

Use batched transaction processing for industries where customers make multiple transactions in short timeframes. For low-volume industries like e-commerce, instant transaction processing per customer is preferred.
High-Volume Industries (Use Batching):
  • iGaming: Multiple bets, spins, or games per session
  • Market Trading: Multiple trades, deposits, withdrawals
  • High-frequency applications: Where customers make many transactions quickly
Low-Volume Industries (Use Instant Processing):
  • E-commerce: Single purchases per customer
  • Subscription services: Monthly/annual billing
  • Low-frequency applications: Where customers make few transactions
Cost Benefits of Batching:
  • Reduces API call overhead significantly
  • Cuts down on processing costs
  • Makes Affelios even more cost-effective
  • Better resource utilization
Performance Benefits:
  • Improves processing efficiency
  • Reduces network overhead
  • Optimizes data transfer
Time Window Grouping:Group all transactions for each customer within a specific time window that you choose. This approach balances cost efficiency with real-time processing needs.Time Window Options:
  • 1 Hour: Near real-time processing, higher costs
  • 4 Hours: Good balance of efficiency and responsiveness
  • 12 Hours: Cost-optimized for most use cases
  • 24 Hours: Maximum cost savings, delayed processing
Real-Time vs. Cost Trade-offs:Shorter Time Windows (1-4 hours):
  • Closer to real-time processing
  • Higher API call frequency
  • Better for time-sensitive applications
  • Slightly higher processing costs
Longer Time Windows (12-24 hours):
  • Maximum cost savings through batching
  • Lower API call frequency
  • Better for high-volume, less time-sensitive operations
  • Optimal for cost-conscious implementations
Choosing Your Time Window:
Affelios Recommendation: For industries or scenarios with high transaction volume (such as iGaming or trading), Affelios recommends using a 24-hour batching window to maximize cost efficiency and system performance.
Implementation Considerations:
  • Monitor transaction volume per customer
  • Adjust time windows based on peak usage periods
  • Consider different windows for different transaction types
  • Implement fallback mechanisms for critical transactions

Performance Optimization

Time Window Grouping Strategy

Optimal Transaction Grouping

Group transactions that occurred within your chosen time window to maximize cost efficiency and system performance.
Grouping Rules:
  • Only group transactions that occurred within the same time window
  • Each customer’s transactions are grouped separately
  • Transactions outside the window are processed in separate batches
  • Maintain chronological order within each batch
Time Window Boundaries:
  • 1 Hour: Group transactions from 00:00-00:59, 01:00-01:59, etc.
  • 4 Hours: Group transactions from 00:00-03:59, 04:00-07:59, etc.
  • 12 Hours: Group transactions from 00:00-11:59, 12:00-23:59
  • 24 Hours: Group all transactions from 00:00-23:59 (daily batches)
Implementation Guidelines:
  • Collect all transactions for each customer within the time window
  • Store transactions with timestamps for proper grouping
  • Process batches at the end of each time window
  • Handle edge cases where transactions span window boundaries
  • Process all transactions for a customer within the same time window together
  • Send as a single API call to Affelios
  • Maintain transaction order and integrity
  • Handle failed batches by retrying the entire group
Cost Optimization:
  • Minimal API calls
  • Maximum batching efficiency
  • Reduced processing overhead
  • Lower total costs
System Performance:
  • Predictable processing patterns
  • Reduced API call frequency
  • Better resource utilization
  • Improved system stability

Next Steps

Now that you understand the best practices for integrating with the Affelios API, you can build more robust and maintainable applications.
What’s Next?
I