async def METHOD_NAME(app: web.Application) -> list[PaymentID]:
    async with get_database_engine(app).acquire() as conn:
        result = await conn.execute(
            sa.select(payments_transactions.c.payment_id)
            .where(payments_transactions.c.completed_at == None)  # noqa: E711
            .order_by(payments_transactions.c.initiated_at.asc())  # oldest first
        )
        rows = await result.fetchall() or []
        return [parse_obj_as(PaymentID, row.payment_id) for row in rows]