πŸ”„How Auto-Pay Works

This guide explains the complete auto-pay flow from start to finish.

The Complete Flow

Phase 1: Setup (One-Time)

Group Configuration:

  1. Group owner enables Premium Group status

  2. Admin enables auto-pay in /settings

  3. Admin selects payment token (e.g., USDT on BSC)

  4. Settings saved βœ…

User Preparation:

  1. User opens bot via DM

  2. Goes to Profile β†’ Set Up Wallet

  3. Selects correct chain (SOL or BSC)

  4. Sends wallet address

  5. Wallet validated and saved βœ…

Phase 2: Starting Competition

Step 1: Initiate

Step 2: Payment Request If auto-pay enabled and token configured:

Step 3: Payment Processing

Step 4: Distribution Setup

Admin selects or types custom split:

Step 5: Competition Starts

Phase 3: During Competition

Users Participating:

Wallet Requirement Enforcement:

Phase 4: Competition Ends

Automatic Ending:

Or Manual Ending:

Phase 5: Automatic Payouts

Step 1: Fetch Data

Step 2: Calculate Amounts

Example:

Step 3: Validate Wallets

Step 4: Execute Payouts

Step 5: Payment Processing

Step 6: Notifications

Phase 6: Final Leaderboard

Error Scenarios

Invalid Wallet Address

Payment Below Minimum

Network Failure

Currency Consistency

Enforcement Rules

βœ… Deposit and payout ALWAYS match

βœ… Token locked during active competition

βœ… Verification before payout

Transaction Records

All payouts tracked in database:

Monitoring & Alerts

Critical Alerts (Sent to monitoring group)

  • Database connection failures

  • Payment verification failures

  • Currency mismatches

  • Payout API errors

Action Required Alerts

  • Partial payments received

  • Individual payout failures

  • Invalid wallet addresses

  • Amounts below minimum

circle-info

All alerts include full context - payment IDs, amounts, currencies, error messages - for quick debugging.

Last updated