**Dependencies:** Issue #27, Issue #30, Issue #55, Contract Issue #5. For webhook delivery, see Issue #36.\n\n*Note:* Webhook sending can be stubbed initially.\n **Context:** Pending payments must expire after a timeout (15 minutes per spec). **Scope:** - **In scope**: Worker job scheduling + status update + webhook. - **Out of scope**: Distributed cron coordination beyond BullMQ. **Tasks:** - Decide scheduling strategy: - schedule a delayed job at payment creation time, or - run a periodic scan for expired `PENDING` payments - Update payment status to `EXPIRED` only if it is still `PENDING` (race-safe with confirmation). - Emit the appropriate webhook event record for delivery (Issue #36). **Implementation Notes:** - Use DB-level guards/transactions to avoid expiring a payment that just confirmed. - Record `expired_at` for audit/debugging. **Files:** `backend/payment_service/src/workers/`
Dependencies: Issue #27, Issue #30, Issue #55, Contract Issue #5. For webhook delivery, see Issue #36.\n\nNote: Webhook sending can be stubbed initially.\n
Context:
Pending payments must expire after a timeout (15 minutes per spec).
Scope:
Tasks:
PENDINGpaymentsEXPIREDonly if it is stillPENDING(race-safe with confirmation).Implementation Notes:
expired_atfor audit/debugging.Files:
backend/payment_service/src/workers/