Skip to content

P2E: add payout provider abstraction #93

@ilyar

Description

@ilyar

Source PRD: tasks/prd-full-play-to-earn.md
Parent epic: #86
PRD section: US-007

Description

Payout rails must sit behind backend adapters so rewards are not hardcoded to one provider or currency.

Acceptance Criteria

  • Define RewardPayoutProvider interface for quote, create payout, status sync, cancel where supported, and provider webhook handling.
  • Supported provider types are config-driven: manual, gift_card, ton_wallet, crypto_exchange, fiat_provider, or telegram_if_supported.
  • MVP can use manual provider for testnet or controlled private payouts.
  • Production provider requires secrets only on backend, never in frontend.
  • Payout provider errors are mapped to stable internal error codes.
  • Tests use a fake provider and cover success, pending, failure, retry, duplicate webhook, and provider outage.

Constraints

  • Keep current paid PvP settlement as entry fee, not player-funded prize pool.
  • Do not make Season Points redeemable or refundable.
  • Keep payout/compliance/provider secrets backend-only.
  • Treat this as deferred future-phase work until mechanics/self-host production readiness is stable.

Notes

Any blockchain payout path needs separate legal approval and wallet-risk controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: architectureSystem boundaries, provider contracts, and module ownershiparea: backendServer-side services, APIs, reducers, and data mutationsdomain: operationsRunbooks, observability, incident handling, migration, and support flowsdomain: paymentsTelegram Stars, payment webhooks, refunds, and paid balance flowdomain: securityAuth, secrets, trust boundaries, permissions, and abuse resistancepriority: highImportant for MVPstatus: deferredDeferred until the current active milestone is stabletype: featureNew capability or product improvement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions