QuickPass Store Integration with Main Product
QuickPass Store Integration with Main Product
Definitions
- Credits - internal currency of the main product
- QuickPass Coins - internal currency of QuickPass that users spend in the store
- Nominal Product - product with fixed credit amount and limited stock
What is Store Integration
Store integration allows selling main product credits through the QuickPass store. Users can spend QuickPass coins to receive credits in the main product.
How it Works
- User selects a product in QuickPass store (e.g., "500 credits")
- Pays with QuickPass coins for the purchase
- QuickPass sends a request to the main product to credit the amount
- Main product confirms the crediting
- User receives credits in the main product
Product Example
"500 Credits"
- User sees the product in QuickPass store
- Price: 100 QuickPass coins
- Available: 50 pieces (stock controlled by QuickPass)
- Upon purchase receives 500 main product credits
- Stock automatically decreases: 49 pieces
Requirements from Main Product Team
Minimum Requirements
- API for crediting - endpoint for receiving crediting requests
- User validation - checking user existence in the system
- Operation confirmation - returning status of successful/unsuccessful crediting
Technical Integration Implementation
API endpoint for crediting:
POST /api/v1/credits/increase
Content-Type: application/json
Authorization: Bearer {api_key}
{
"user_id": "12345",
"amount": 500,
"currency": "credits",
"order_id": "qp_order_789",
"product_name": "500 credits",
"source": "quickpass_store"
}Response from main product:
{
"success": true,
"transaction_id": "tx_456",
"new_balance": 2500, // if needed
"credited_amount": 500
}On error:
{
"success": false,
"error_code": "USER_NOT_FOUND",
"error_message": "User not found",
"retry_allowed": false
}Main Product Product Types
Game Currency (Nominal Products)
- Credits - main currency for bets and purchases
- 100 credits (stock: 200 pcs.)
- 500 credits (stock: 150 pcs.)
- 1000 credits (stock: 75 pcs.)
- Premium Currency - for exclusive features
- 50 crystals (stock: 30 pcs.)
- Bonus Points - loyalty accumulation system
- 200 bonus points (stock: 100 pcs.)
Game Advantages
- Free Spins/Free Bets - free games or bets
- Multipliers - increased coefficients for a certain time
- Cashback Bonuses - return of part of lost funds
Statuses and Privileges
- VIP Status - premium features for a period
- Increased Limits - higher bet amounts
- Exclusive Access - to closed games and tournaments
Purchase Processing Flow
Action Sequence
Product Selection in QuickPass
- User selects main product item
- QuickPass coin balance is checked
Order Creation
- QuickPass checks product stock (availability)
- Creates order with "Processing" status
- Decreases product stock by 1 unit
- QuickPass coins are reserved on user account
Request to Main Product
- Sending purchase data via API
- Waiting for confirmation within 30 seconds
Response Processing
- On success: deduct QuickPass coins, complete order
- On error: return QuickPass coins, cancel order
User Notification
- About successful purchase and credit crediting
- Or about error with fund return
Error Handling
Temporary Errors (network, timeout):
- Automatic retries (3 times with 10 sec intervals)
- On failure - return coins and notify user
Critical Errors (user not found):
- Immediate order cancellation
- Return QuickPass coins
- Restore product stock (+1 unit)
- Logging for analysis
Partial Errors (insufficient funds in main product):
- Return QuickPass coins
- Restore product stock (+1 unit)
- Notification with explanation
"Product Out of Stock" Errors:
- Display "Out of Stock" in store
- Automatic product hiding when stock = 0
- Admin notifications about need for restocking
Product Configuration in QuickPass
Main Product Item Creation
Basic Information:
- Name: "1000 credits"
- Description: "Top up balance in main product"
- Price: 200 QuickPass coins
Stock Management:
- Initial stock: 100 pieces
- Current stock: 67 pieces
- Minimum stock for alert: 10 pieces
- Auto-hide when stock: 0
Integration Parameters:
- Resource type: "external_currency"
- API endpoint: "/api/v1/credits/increase"
- Amount to credit: 1000
- Currency: "credits"
Delivery Settings:
- Method: "API call"
- Timeout: 30 seconds
- Retries: 3 attempts
Availability Management
- User Limits: maximum X purchases per user
- Time Restrictions: available 24/7 or on schedule
- Privileges: store access for users who completed main product tasks
Monitoring and Analytics
Key Metrics
- Number of successful main product credit purchases
- Success transaction percentage
- Average request processing time
- Popularity of different credit denominations
- Conversion from QuickPass coins to main product credits
- Product stock turnover
- Frequency of admin stock replenishment
Problem Tracking
- Logs of all API requests and responses
- Alerts when response time exceeds (>10 sec)
- Notifications when error rate >5%
- User balance monitoring after operations
- Alerts for critically low product stock (<10 pieces)
Security and Validation
Fraud Protection
- Purchase frequency limits (no more than 1 per minute)
- IP address and device verification
- Suspicious account blocking
- Double verification for large transactions
Data Integrity
- Operation idempotency (duplication protection)
- Transaction atomicity (all or nothing)
- Regular balance reconciliation between systems
- Transaction log backups
Effectiveness Analytics
User Metrics
- Percentage of users purchasing main product coins
- Average purchase amount per user
- Purchase frequency (weekly/monthly)
- User retention after first purchase
Financial Indicators
- Total volume of main product coins sold
- Average check in QuickPass coins
- Operation margins
- ROI from store integration
Technical Support
User Problem Handling
- Automatic fund return on technical failures
- Support service for dispute resolution
- Manual balance adjustment capability
- Complete operation history for investigation
Scaling
- Rate limiting for overload protection
- Queues for peak load processing
- Caching frequently requested data
- Horizontal API scaling
Administrative Stock Management
Stock Replenishment
- Manual Replenishment: admin sets new product stock
- Auto Replenishment: automatic restocking when minimum reached
- Bulk Management: restocking multiple products simultaneously
- Change History: complete audit log of all stock operations
Sales Control
- Sales Limits: restricting number of sales per day/week
- Priority Users: stock reserve for VIP clients
Stock Analytics
- Consumption Forecast: when product will run out at current sales rate
- Optimal Stock: recommendations for stock size
